用Windows 对象实现的脚本打印

windows版打印对象使用,将代码复制到<body>中即可:

 

<OBJECT id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" width="0" VIEWASTEXT></OBJECT>   

<div align="right" class="noprint">
<input type="button" value="直接打印" onClick="window.print()" class="btnstyle1"> 
<input type="button" value="打印试卷" onClick="document.all.WebBrowser.ExecWB(6,1)" class="btnstyle1">   
<input type="button" value="页面设置" onClick="document.all.WebBrowser.ExecWB(8,1)" class="btnstyle8">   
<input type="button" value="打印预览" onClick="document.all.WebBrowser.ExecWB(7,1)" class="btnstyle9">  
<input type="button" value="关闭窗口" onClick="document.all.WebBrowser.ExecWB(45,1)" class="btnstyle3">
<input type="button" value="打印帮助" onClick="window.open('http://bbs.dongao.com/viewthread.php?tid=718500&extra=page%3D1')" class="btnstyle2">
</div> 

 

你可能感兴趣的:(windows,PHP,脚本,bbs)