发布网友 发布时间:2022-04-22 02:14
共1个回答
热心网友 时间:2022-04-26 16:31
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
</object>
<OBJECT id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11><param name=Command value=Close></object>
<SCRIPT>
function window.onbeforeprint(){
alert("打印前事件");
}
function window.onafterprint(){
alert("打印后事件");
closes.Click();
}
</SCRIPT>
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置>
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,6) type=button value=打印预览>
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=页面打印>