62,046
社区成员
发帖
与我相关
我的任务
分享
<html>
<head runat="server">
<title></title>
<script type="text/javascript">
function printpage()
{
document.getElementById("noprint").style.display="none";//打印整个页面包括标题,在调用打印方法之前隐藏不需要打印的页面标签。无标题将不打印标题
print();
}
function printsetup()
{
try
{
document.all.WebBrowser.ExecWB(8, 1);
}
catch(e)
{
//ymPrompt.errorInfo({title:SYS_NAME, message:'页面设置需要ActiveX, 请允许本站点使用ActiveX'});
}
printpage();
}
</script>
</head>
<body>
<object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0"
width="0" viewastext>
</object>
<form id="form1" runat="server">
<font color="red">打 印打 印打 印<br /></font> dfdsfdsfds
<div>
<input type="button" value="打 印" id="noprint" class="btnnm" onmouseover="this.className='btnon'"
onmouseout="this.className='btnnm'" onclick="printsetup();" />
</div>
</form>
</body>
</html>