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" onclick="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:
posted @ 2017-12-28 12:24  底云飞  阅读(8151)  评论(0编辑  收藏  举报