<!-- IE5.5以上 -->
<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)">

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1978/1978459.xml?temp=.1203272web打印的大全
      

  2.   

    <OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" id="WB" width="0" VIEWASTEXT>
    </OBJECT>
    <script language="javascript">
    function doPageSet(){
    WB.ExecWB(8,1)
    }
    function doPreview(){
    //Print
    WB.ExecWB(7,1)
    }
    </script>
      

  3.   

    dopageset()是实现页面设置的,dopreview()实现打印御览,定义按钮,调用御览或者页面设置函数即可实现相应的功能