jsp页面的打印

 打印:

<input type="button" class="button1" onclick="javascript:window.print();" value="打印">

 

 

 

只打印需要的内容:

1 <style type="text/css" media="print">
2 .noprint{display : none;}
3 </style>

不希望打印的部分加上noprint样式就可以了。可以在预览里直接看到效果。

 

posted @ 2012-06-27 11:14  飛天大盜  阅读(353)  评论(0)    收藏  举报