zoukankan      html  css  js  c++  java
  • 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:
  • 相关阅读:
    fzu 2138
    hdu 1598 暴力+并查集
    poj 1734 floyd求最小环,可得到环上的每个点
    floyd求最小环 模板
    fzu 2087并查集的运用求最小生成树的等效边
    hdu 2586 lca在线算法(朴素算法)
    CF 602 D. Lipshitz Sequence 数学 + 单调栈 + 优化
    Problem 2238 Daxia & Wzc's problem 1627 瞬间移动
    D. Tavas and Malekas DFS模拟 + kmp + hash || kmp + hash
    K-th Number 线段树的区间第K大
  • 原文地址:https://www.cnblogs.com/diyunfei/p/8135055.html
Copyright © 2011-2022 走看看