首页 > Web开发 > 详细

jquery 浏览器打印

时间:2017-06-12 16:47:01      阅读:240      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="Scripts/jquery-1.10.2.js"></script>
    <script src="Scripts/jquery.PrintArea.js"></script>
    <script type="text/javascript">
        $(function () {
            //打印
            $("#btnPrint").bind("click", function (event) {
                $("#myPrintArea").printArea();
            });
           
        })
    </script>
</head>
<body>
    <div id="myPrintArea">
        <div>.....文本打印部分.....</div>
        <div>
            <table>
                <tr>
                    <td>这是一张表</td>
                    <td>这是一张表</td>
                </tr>
                <tr>
                    <td>这是一张表</td>
                    <td>这是一张表</td>
                </tr>
            </table>

        </div>
    </div>
    <div class="quote_title">引用</div><div class="quote_div"></div> 
    <input type=button class="noprint" id="btnPrint" value=" 打 印 "> <!--onclick=javascript:window.print()-->
</body>
</html>

 

jquery 浏览器打印

原文:http://www.cnblogs.com/zmztya/p/6993613.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!