网页设置打印
怎么打印网页呢?并且有打印按钮,但打印的时候不出来打印按钮?下面就是源代码
<html>
<head>
<title>打印设置</title>
<style media=print>
.Noprint{display:none;}
</style>
</head>
<body >
<center class="Noprint" >
<p>
<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>
</OBJECT>
<input type=button value=打印 onclick=document.all.WebBrowser.ExecWB(6,1)>
<input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)>
<input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)>
</p>
<p><input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)>
<br>
</p></center>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="0" class="tabp">
<tr>
<td colspan="3">需要打印的内容</td> </tr>
</table>
</body>
</html>
保存为.html运行试试.