打印时把它隐藏就可以了:
<div id="test" style="display:block"><img src="a.jpg">测试</div>
<table>
..
</table>
<input type="button" value="打印" name="butt" onClick="javascript:hide()">
...
<script language="javascript">
hide()
{
    document.all.item("test").style.display="none";
    window.print();
}
</script>

解决方案 »

  1.   

    楼主有打印的程序吗? 我找了很久! 能给我一份吗?  [email protected]
      

  2.   

    <!--用浏览器方式打印-->
    function PrintTable(Id)
    {
    var mStr;
    mStr = window.document.body.innerHTML ;
    var mWindow = window;
    window.document.body.innerHTML =Id.innerHTML ;
    mWindow.print();
    window.document.body.innerHTML = mStr;
    } 
    ...
       <table  border=2 id=table1 >
    ...
       </table>
    <input type=button onclick=return PrintTable(table1)>