web前端

位置:IT落伍者 >> web前端 >> 浏览文章

有分页功能的WEB打印


发布日期:2022年01月13日
 
有分页功能的WEB打印

<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>

上一篇:数据库迁移中的Web翻页优化实例

下一篇:为Web应用程序创建测试用例的办法二