关灯
开启左侧

[网页制作] 一个不错的html 打印代码支持翻页

[复制链接]
swmozowtfl 发表于 2015-7-14 22:15:45 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
 
ylbtech_html_print
html打印代码,支持翻页
代码如下:
<html>
<head>
<meta name=vs_targetschema content=>
<title>看看</title>
<meta http-equiv=content-type content=text/html; charset=gb2312>
<!--media=print 这个属性可以在打印时有效-->
<style media=print>
.noprint{display:none;}
.pagenext{page-break-after: always;}
</style>
<style>
.tdp
{
border-bottom: 1 solid #000000;
border-left: 1 solid #000000;
border-right: 0 solid #ffffff;
border-top: 0 solid #ffffff;
}
.tabp
{
border-color: #000000 #000000 #000000 #000000;
border-style: solid;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 1px;
border-left-width: 1px;
}
.noprint {
font-family: 宋体;
font-size: 9pt;
}
</style>
</head>
<body >
<center class=noprint >
<p>
<object id=webbrowser classid=clsid:8856f961-340a-11d0-a96b-00c04fd705a2 height=0 width=0>
</object>
<input type=button value=打印 onclick=document.all.webbrowser.execwb(6,1)>
<input type=button value=直接打印 onclick=document.all.webbrowser.execwb(6,6)>
<input type=button value=页面设置 onclick=document.all.webbrowser.execwb(8,1)>
</p>
<p> <input type=button value=打印预览 onclick=document.all.webbrowser.execwb(7,1)>
<br/>
</p>
<hr align=center width=90% size=1 noshade>
</center>
<table width=90% border=0 align=center cellpadding=2 cellspacing=0 class=tabp>
<tr>
<td colspan=3 class=tdp>第1页</td>
</tr>
<tr>
<td width=29% class=tdp> </td>
<td width=28% class=tdp> </td>
<td width=43% class=tdp> </td>
</tr>
<tr>
<td colspan=3 class=tdp> </td>
</tr>
<tr>
<td colspan=3 class=tdp><table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=50% class=tdp><p>这样的报表</p>
<p>对一般的要求就够了。</p></td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<hr align=center width=90% size=1 noshade class=noprint >
<!--分页-->
<div class=pagenext></div>
<table width=90% border=0 align=center cellpadding=2 cellspacing=0 class=tabp>
<tr>
<td class=tdp>第2页</td>
</tr>
<tr>
<td class=tdp>看到分页了吧</td>
</tr>
<tr>
<td class=tdp> </td>
</tr>
<tr>
<td class=tdp> </td>
</tr>
<tr>
<td class=tdp><table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=50% class=tdp><p>这样的报表</p>
<p>对一般的要求就够了。</p></td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<hr align=center width=90% size=1 noshade class=noprint >
<div class=pagenext></div>
<table width=90% border=0 align=center cellpadding=2 cellspacing=0 class=tabp>
<tr>
<td class=tdp>第3页</td>
</tr>
<tr>
<td class=tdp>看到分页了吧</td>
</tr>
<tr>
<td class=tdp> </td>
</tr>
<tr>
<td class=tdp> </td>
</tr>
<tr>
<td class=tdp><table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=50% class=tdp><p>这样的报表</p>
<p>对一般的要求就够了。</p></td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

更多网页制作信息请查看: 网页制作
 

精彩评论8

正序浏览
effoggikeftor 发表于 2015-11-1 14:43:48 | 显示全部楼层
 
怎么就没人拜我为偶像那??
 
seazvyt 发表于 2015-11-1 14:44:14 | 显示全部楼层
 
苍天之下,厚土之上,竟有如此奇人异士、文人墨客!讥讽于谈笑间,笑骂于无形中,层次之高,境界之深,非我等所能匹及,偶像啊!
 
gevaemaidovef 发表于 2015-11-1 14:44:43 | 显示全部楼层
 
看到本ID的这位童鞋,我看你气度不凡,谈吐间隐隐有王者之气,日后必有一番作为! 内有“加关注”三字,你就顺手把它点了吧。相得准,我分文不收;相不准,你也好回来找我。
 
mwxny 发表于 2015-11-1 14:44:43 | 显示全部楼层
 
今天统计好像出了问题
 
GoodyFouppy 发表于 2015-12-4 11:39:03 | 显示全部楼层
 
@,@..是什么意思呀?
 
wwzcdenleclv 发表于 2015-12-4 11:39:38 | 显示全部楼层
 
你这样的表现,就只配这几个字:窝囊废
 
gevaemaidovef 发表于 2015-12-4 11:39:58 | 显示全部楼层
 
哈哈~` 你好有意思哦~
 
buingeEvineus 发表于 2015-12-4 11:40:04 | 显示全部楼层
 
综上所述,恳请各位官员请勿动用武装力量请勿跨村、跨镇、跨市、跨省、跨国、跨洲、跨星球、跨银河系追捕。确因不抓不足以平民愤,或不抓就领不到薪水养家户口的公职人员,建议携带工作证
 
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


0关注

1粉丝

2503帖子

热门图文
热门帖子
排行榜
作者专栏

关注我们:微信订阅号

官方微信

APP下载

全国服务Q Q:

956130084

中国·湖北

Email:956130084@qq.com

Copyright   ©2015-2022  站长技术交流论坛|互联网技术交流平台Powered by©Discuz!技术支持:得知网络  

鄂公网安备 42018502006730号

  ( 鄂ICP备15006301号-5 )