熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

有分頁功能的WEB打印

2022-06-13   來源: JSP教程 

  <html>
<head>
<title>看看</title>
<meta httpequiv=ContentType content=text/html; charset=gb>
<!media=print 這個屬性可以在打印時有效>
<style media=print>
Noprint{display:none;}
PageNext{pagebreakafter: always;}
</style>

  <style>
tdp
{
borderbottom: solid #;
borderleft: solid #;
borderright: solid #ffffff;
bordertop: solid #ffffff;
}
tabp
{
bordercolor: # # # #;
borderstyle: solid;
bordertopwidth: px;
borderrightwidth: px;
borderbottomwidth: px;
borderleftwidth: px;
}
NOPRINT {
fontfamily: 宋體;
fontsize: pt;
}

  </style>

  </head>

  <body >
<center class=Noprint >
<p>
<OBJECT id=WebBrowser classid=CLSID:FADABCFDA height= width=>
</OBJECT>
<input type=button value=打印 onclick=documentallWebBrowserExecWB()>
<input type=button value=直接打印 onclick=documentallWebBrowserExecWB()>
<input type=button value=頁面設置 onclick=documentallWebBrowserExecWB()>
</p>
<p> <input type=button value=打印預覽 onclick=documentallWebBrowserExecWB()>
<br/>
</p>
<hr align=center width=% size= noshade>
</center>

  <table width=% border= align=center cellpadding= cellspacing= class=tabp>
<tr>
<td colspan= class=tdp>第頁</td>
</tr>
<tr>
<td width=% class=tdp>&nbsp;</td>
<td width=% class=tdp>&nbsp;</td>
<td width=% class=tdp>&nbsp;</td>
</tr>
<tr>
<td colspan= class=tdp>&nbsp;</td>
</tr>
<tr>
<td colspan= class=tdp><table width=% border= cellspacing= cellpadding=>
<tr>
<td width=% class=tdp><p>這樣的報表</p>
<p>對一般的要求就夠了</p></td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
<hr align=center width=% size= noshade class=NOPRINT >
<!分頁>
<div class=PageNext></div>
<table width=% border= align=center cellpadding= cellspacing= class=tabp>
<tr>
<td class=tdp>第頁</td>
</tr>
<tr>
<td class=tdp>看到分頁了吧</td>
</tr>
<tr>
<td class=tdp>&nbsp;</td>
</tr>
<tr>
<td class=tdp>&nbsp;</td>
</tr>
<tr>
<td class=tdp><table width=% border= cellspacing= cellpadding=>
<tr>
<td width=% class=tdp><p>這樣的報表</p>
<p>對一般的要求就夠了</p></td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>


From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19124.html
  • 上一篇文章:

  • 下一篇文章:
  • 推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.