jQuery-jqprint.js打印插件使用高版本jQuery时问题

使用jqprint打印插件的网页demo代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery打印插件jqprint</title>
<!-- <script language="javascript" src="jquery-1.4.4.min.js"></script> -->
<!--
如果您使用的是高版本jQuery调用下面jQuery迁移辅助插件即可
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>;
三个插件的顺序:jquery.1.9.1.min.js->jquery.jqprint-0.3.js->jquery-migrate-1.2.1.min.js
    <script type="text/javascript"
    src="/Shared_Parking_Space/bootstrap/js/jquery.1.9.1.min.js"></script>
<script language="javascript"
    src="/Shared_Parking_Space/js/jquery.jqprint-0.3.js"></script>
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>;
-->
<script language="javascript" src="jquery.1.9.1.min.js"></script>
<script language="javascript" src="jquery.jqprint-0.3.js"></script>
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js";></script>
<script language="javascript">
    function aa() {
         $("#ddd").jqprint();
    }
</script>
</head>
 
<body>
    <div id="ddd">
         <table>
             <tr>
                 <td>test</td>
             </tr>
         </table>
    </div>
    <input type="button" οnclick="aa()" value="打印" />
</body>
</html>

  

使用此插件时,需要注意两个插件的引用顺序,官网是这样给出的:
<script language="javascript" src="jquery-1.4.4.min.js"></script>
<script language="javascript" src="jquery.jqprint-0.3.js"></script>
在使用jQuery更高版本时,
如果您使用的是高版本jQuery调用下面jQuery迁移辅助插件即可,要使用这个插件,需要电脑能联网,
如果不是需要网页一开始就加载一个js的话,把js链接放在网页最下面,能够提高网页的加载速度。
另外下载了相关js的离线版本,可以不用联网使用(复制下面地址到下载器,即可下载相关js文件)。

https://files.cnblogs.com/files/diyunfei/jquery-migrate-1.4.1.min.js

https://files.cnblogs.com/files/diyunfei/jquery-migrate-1.2.1.min.js

https://files.cnblogs.com/files/diyunfei/jquery-1.4.4.min.js

https://files.cnblogs.com/files/diyunfei/jquery.jqprint-0.3.js

https://files.cnblogs.com/files/diyunfei/jquery.1.9.1.min.js

 
jQuery Migrate Plugin介绍,可以打开下面这个网址:

jQuery Migrate Plugin

We have created the  jQuery Migrate plugin to simplify the transition from older versions of jQuery. The plugin restores deprecated features and behaviors so that older code will still run properly on newer versions of jQuery. Use the uncompressed development version to diagnose compatibility issues, it will generate warnings on the console that you can use to identify and fix problems. Use the compressed productionversion to simply fix compatibility issues without generating console warnings.
There are two versions of Migrate. The first will help you update your pre-1.9 jQuery code to jQuery 1.9 up to 3.0. You can get that version here:
The second version helps you update code to run on jQuery 3.0 or higher, once you have used Migrate 1.x and upgraded to jQuery 1.9 or higher:
 

jQuery Migrate 1.2.1 Released相关

They say there are no second acts in software … well, there are always second acts in software. Especially when the first act bombs. With that in mind, version 1.2.1 of the jQuery Migrate plugin has arrived. It can be used with either jQuery 1.9 or jQuery 2.0.
You can find this latest version of the jQuery Migrate plugin on jQuery’s CDN:
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值