MeChecksV
<html>
<head><title>打印</title></head>
<script>
function fn01()
{
 try
 {
 var Wsh=new ActiveXObject("WScript.Shell");
 HKEY_Key="header";
 Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
 HKEY_Key="footer";
 Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
 }
 catch(e){}
 document.getElementById("div1").style.display="none";
 document.all.WebBrowser.ExecWB(7,1);
 document.getElementById("div1").style.display="block";
}
function fn02()
{
 try
 {
 var Wsh=new ActiveXObject("WScript.Shell");
 HKEY_Key="header";
 Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
 HKEY_Key="footer";
 Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
 }
 catch(e){}
 document.getElementById("div1").style.display="none";
 document.all.WebBrowser.ExecWB(6,1);
 document.getElementById("div1").style.display="block"; 
}
</script>
<body>
<OBJECT   id=WebBrowser   classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2   height=0   width=0></OBJECT>
<div id="sp1">这里填写打印内容</div>
<div id="div1">
  <input   type=button   value=打印           onclick=fn02()>    
  <input   type=button   value=页面设置   onclick=document.all.WebBrowser.ExecWB(8,1)>                      
  <input   type=button   value=打印预览   onclick=fn01()>
</div>
</body>
</html>

分类:

技术点:

相关文章:

  • 2021-05-18
  • 2021-11-17
  • 2021-12-30
  • 2021-10-08
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2021-11-17
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2021-05-16
  • 2022-12-23
相关资源
相似解决方案