<head runat="server">
<title></title>
<style type="text/css">
@media print{
#printdiv{display:none}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="printdiv" style=" text-align:center;">
<object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" width="0"></object>
<input type="button" value="打印页面设置" οnclick="document.all.WebBrowser.ExecWB(8,1)"/>
<input type="button" value="打印预览" οnclick="document.all.WebBrowser.ExecWB(7,1)"/>
<input type="button" value="打印" οnclick="document.all.WebBrowser.ExecWB(6,1)"/>
</div>
打印区域
</form>
</body>
调用浏览器打印功能
最新推荐文章于 2024-06-10 16:43:59 发布