页面中添加样式: <style media="print"> @page { size: auto; /* auto is the initial value */ margin: 0mm; /* this affects the margin in the printer settings */ } </style> 直接调用 window.print(); 如果ie不支持可以用以下方法:判断出IE浏览器之后调用 if(getExplorer() == &qu
//jsp打印时去除页眉页页脚 打印前加入下面代码即可 var HKEY_Root,HKEY_Path,HKEY_Key; HKEY_Root="HKEY_CURRENT_USER"; HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"; var head,foot,top,bottom,left,right; var Wsh=new ActiveXObject("WScrip