<input type=button name="Print" value="Print" onclick = "self.print();">

解决方案 »

  1.   

    <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"> </object> 
    <input name=Button onClick="document.all.WebBrowser.ExecWB(8,1)" type=button value=页面设置 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1"> 
    <input name=Button onClick="document.all.WebBrowser.ExecWB(7,1)" type=button value=打印预览 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1">
    <input name=Button onClick="document.all.WebBrowser.ExecWB(6,1)" type=button value=打印 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1"> IE6支持
      

  2.   

    <STYLE> 
    @media print { 
    input {display:none} 
    textarea{display:none} 
    .noprint{display:none} 

    </STYLE> 
    </head><body topmargin="11" leftmargin="11">
    <div class=noprint>
    <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"> </object> 
    <input name=Button onClick="document.all.WebBrowser.ExecWB(8,1)" type=button value=页面设置 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1"> 
    <input name=Button onClick="document.all.WebBrowser.ExecWB(7,1)" type=button value=打印预览 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1">
    <input name=Button onClick="document.all.WebBrowser.ExecWB(6,1)" type=button value=打印 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1"> 
    <input name=Button onClick="window.close()" type=button value=关闭 class="botton0" onmouseout=className="botton0" onmouseover=className="botton1"> 
    <hr width="100%" size=1 color="#000000">
    </div>
    <br>
    <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
      <tr> 
        <td align="center" valign="top">
         <img src="/upfile/2004130105227.jpg" border=0>
        </td>
      </tr>
    </table>其中套用了 noprint 样式的不会打印出来
      

  3.   

    在jsp中上面都不能实现
    !
    请问让在<form>里面的<submit>不响应action事件?
      

  4.   


    打印:window.print()就可以了
    那:页面设置 打印预览用什么