jquery.PrintArea.js打印插件

1、引入jquery.js和jquery.PrintArea.js

<script src="js/jquery.js" type="text/JavaScript"></script>
<script src="js/jquery.PrintArea.js" type="text/JavaScript"></script>

2.设置打印区域

<div class="my_show">
//打印区域
</div>

3.打印按钮

<input type="button" class="my_show" value="打印"/>

4.js函数

$(".print").click(function(){
    $(".my_show").printArea();
});

插件下载地址
PrintArea官网下载地址

posted on 2023-01-30 16:36  小破孩楼主  阅读(361)  评论(0编辑  收藏  举报