<style>@media print {.print{display: none;}}</style>
... ...<input type=button class=print value='打印'>
... ...<input type=button class=print value='打印'>
解决方案 »
- 如何给动态生成的<li>绑定事件
- 如何能实现看不到显示但确相当于浏览了?
- Ext问题:
- 如何用js实现局部放大图象?可以实现吗?
- <select style="....">样式问题?
- 帮忙----------file的使用。。。。。。。
- 怎么根据window窗口的名称,得到窗口这个对象?
- window.event.srcElement.id 在mozzilla & nn6中的替换方式
- "您有新的短消息":两者之间的通讯是怎么实现的?
- 为什么后台返回一个json就正常获得data,返回两个json就报错
- 如何获取form下的某个文本框是否聚焦?
- document.all("currentLocation").style.display="none";
.noprint { display: none }
</style> <input type="button" class="noprint" name="print" value="Print the Page" style="height:20px" onclick="javascript:window.print();"/> <input type="button" class="noprint" name="saveas" value="Save the Page" style="height:20px" onclick="if(!window.document.execCommand('SaveAs',false,' Laber')) return false;"/>
<!--
function onprint()
{
printbutton.style.display="none";
this.print();
printbutton.style.display="";
}
-->
</script>
……
……
<!--==================打印数据========================================-->
<br>
<center>
<div name="printbutton" id="printbutton">
<table><tbody>
<tr><td bgcolor=#4080b0 height=22 valign=middle>
<input id="button1" name="button1" type="button" value="打印数据" LANGUAGE=javascript onclick="return onprint()">
</td></tr>
</tbody></table>
</div>
</center>
<!--==================打印数据========================================-->
谢谢各位!