<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)>
<input type=button value=打印预览   onclick=document.all.WebBrowser.ExecWB(7,1)>
<hr>

解决方案 »

  1.   

    这个不用PHP来实现,是用客户端脚本来实现的
    <INPUT type=button value="打印" onclick="document.execCommand('Print')">
    该代码不要放入<??>中即可
      

  2.   

    谢谢,真的好用的,不过“打印预览”这一项不好用,这就是html的标记是吗?这些知识从哪里可以得到啊?
      

  3.   

    还可以转成pdf文档进行打印。
      

  4.   

    请问input标记后面的函数是从哪里得到的啊?