当前位置:   article > 正文

jq jqprint 设置页脚_jquery web打印 取消 页眉和页脚

jqprint 打印页眉页脚怎么设置

使用打印插件说明:

/*

* printThis v1.15.1

* @desc Printing plug-in for jQuery

* @author Jason Day

*

*/

print.css  文件内容

@page

{

size: auto; /* auto is the initial value */

margin: 0mm 10mm 0mm 10mm; /* this affects the margin in the printer settings 最关键的还是这个*/

}

body

{

background-color:#FFFFFF;

margin: 0mm; /* this affects the margin on the content before sending to printer */

padding: 5mm 0 5mm 0 ;

}

修改打印插件源码

第190 行处,改为: $head.append("");

页面调用程序

$('#basic').on("click", function () {

$('.demo').printThis({

loadCSS: "css/print.css"

});

});

$('#advanced').on("click", function () {

$('#impAndContent').printThis({

importCSS: true, // import parent page css

importStyle: false, // import style tags

printContainer: true, // grab outer container as well as the contents of the selector

loadCSS: "css/print.css", // path to additional css file - use an array [] for multiple

header: "

Look at all of my kitties!

"

});

});

实现效果如图:

;

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/171390
推荐阅读
相关标签
  

闽ICP备14008679号