页面显示打印与打印预览按钮(与PHP无关)

来源:互联网 发布:北京婚纱照价位 知乎 编辑:程序博客网 时间:2024/04/30 05:31

  <html> 

<head> 
    <title> 打印页面 </title> 
</head> 
<body> 
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser 
width=0></OBJECT>
<a href="#" onclick=document.all.WebBrowser.ExecWB(6,1)>打印</a>
<a href="#" onclick=document.all.WebBrowser.ExecWB(8,1)> 页面设置</a>
<a href="#" onClick=document.all.WebBrowser.ExecWB(7,1)>打印预览</a>
<input type="button" onclick="document.all.WebBrowser.ExecWB(6,1)"value="打印">
<input type="button" onclick="document.all.WebBrowser.ExecWB(8,1)"value=" 页面设置">
<input type="button" onClick="document.all.WebBrowser.ExecWB(7,1)" value="打印预览">
</body> 
</html>
是用锚链接还是Button由你自己决定喽,这个在基于ie内核的浏览器上可以,在Safari上我测试不可以。
原创粉丝点击