1, ScriptX插件初次使用都要先下载安装,压缩包直接放在项目里庵后运行,打开页面根据提示安装就可以了;
2,在* *头中引入* *
,,@media ,,屏幕{.onlyPrint{显示:没有}},,, @media ,,才能打印{.onlyShow{显示:没有},,,。onlyPrint {page-break-before:总是}}
然后剩下的js操作就可以了;
3
function printsetup (), { ,,,,,,,//,打印页面设置, ,,,,,,,factory.printing.PageSetup (); ,,,} ,,,function doPrint (), { ,,,if (确认(& # 39;确定打印吗? & # 39;)),{ ,,,,,,,document.all.factory.printing.header =,““,//页眉 ,,,,,,,document.all.factory.printing.footer =,““,//页脚 ,,,,,,,//设置边距 ,,,,,,,document.all.factory.printing.leftMargin =19.05;//离开 ,,,,,,,document.all.factory.printing.topMargin =19.05;//顶部 ,,,,,,,document.all.factory.printing.rightMargin =19.05;//右 ,,,,,,,document.all.factory.printing.bottomMargin =19.05;//底部 ,,,,,,,document.all.factory.printing.portrait =,假的,,//横向打印 ,,,,,,,document.all.factory.printing.Print(假的),,//只打印当前框架,不管是否隐藏 ,,,,,,,} ,,,} & lt; center 类=aaa> & lt; input  onclick=javascript: printsetup();,类型=button 价值=打印页面设置,名字=button_setup /祝辞, & lt; input  onclick=javascript: doPrint();,类型=button 价值=打印,名字=button_print /祝辞, & lt;/center>
根据自己实际情况设置初始参数,如需保存更改的打印设置的参数,可以考虑使用JavaScript设置饼干进行操作。