<a href=# onclick="window.print();return false">打印</a>

解决方案 »

  1.   

    <OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>
    <a href=# onclick="document.all.WebBrowser.ExecWB(6,1);return false">打印</a>
      

  2.   


    <a herf="javascript:window.print()">打印</a>
      

  3.   

    <% '告诉浏览器用word来显示文档内容Response.ContentType = "application/msword" '文档设定response.AddHeader "content-disposition", "inline; filename=report.doc"%>
    <object id="WebBrowser" width=0 height=0 
    classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
    </object>
    <input type="button" name="Button" value="打印预览" onClick="document.all.WebBrowser.ExecWB(7,1)"><input type="button" name="Button1" value="打印" onClick="javascript:window.print()">
    <input type="button" name="Button" value="word打印" onclick="location='anchor.htm'">
    <a href="wordprintpreview11.asp" target="_blank">打印</a>