页面打印时强行分页的处理table换行处理

在要打印强行分页的地方加上:

<P class=normal style="PAGE-BREAK-BEFORE: always">&nbsp;</P>

即可. 解释如下:

page-break-before版本:CSS2  兼容性:IE4+ 继承性:无
语法:
page-break-before : auto | always | avoid | left | right | null
取值:

auto : 假如需要在对象之前插入页分割符
always : 始终在对象之前插入页分割符
avoid : 未支持。避免在对象之前插入页分割符
left : 未支持。在对象之前插入页分割符直到它到达一个空白的左页边
right : 未支持。在对象之前插入页分割符直到它到达一个空白的右页边
null : 空白字符串。取消页分割符设置

 

 

二 是实现导出,打印,页面设置,打印预览的功能

<object id="WebBrowser" style="z-index: 104; left: 624px; width: 0px; position: absolute;
            top: 160px; height: 0px" height="112" width="77" classid="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"
            viewastext>
        </object>
          <div id="btn" style="text-align: center; width: 90%; margin-bottom: 5px">
          <button class="input-button" οnclick="document.execCommand('saveas','','巡检单.html');"
                style="width: 80px; height: 20px" type="button">导出</button>
              &nbsp;<input class="input-button" οnclick="btn.style.display='none';document.all.WebBrowser.ExecWB(6,6);btn.style.display='block';"
                    type="button" value="打 印" style="width: 80px; height: 20px" id="Button1">
                <input class="input-button" οnclick="btn.style.display='none';document.all.WebBrowser.ExecWB(8,1);btn.style.display='block';"
                    type="button" value="页面设置" style="width: 80px; height: 20px">
                <input class="input-button" οnclick="btn.style.display='none';document.all.WebBrowser.ExecWB(7,1);btn.style.display='block';"
                    type="button" value="打印预览" style="width: 80px; height: 20px">
            </div>

转载于:https://www.cnblogs.com/qihaiyan1989/archive/2010/08/05/1792863.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值