近期碰到了一个关于 打印插件 jquery.print.js 页眉、页脚的设置问题 在网上搜索了很多资料 发现这个插件的配置方法很少基本上都是用的js 的方法来取消,照着上面说的试了很久还是没有效果,后来换了种思路 找到了一段 通过 css 来取消 页眉、页脚
//此段就可以消除页眉页脚
<style type="text/css" media="print">
@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 */
}
</style>
//启示如下图:就是在下面的网址中找到的
//在这里呢还是附上有关资料的地址 方便查询
http://stackoverflow.com/questions/1960939/disabling-browser-print-options-headers-footers-margins-from-page/2780518#2780518