dw_1.object.datawindow.print.preview = "yes" //打印预览
dw_1.object.datawindow.print.preview.zoom = 25 //打印预览时的百分比大小
dw_1.object.datawindow.print.margin.top = 100 //上页边距1厘米
dw_1.object.datawindow.print.margin.bottom = 100 //下页边距1厘米
dw_1.object.datawindow.print.margin.left = 100 //左页边距1厘米
dw_1.object.datawindow.print.margin.right = 100 //右页边距1厘米
dw_1.object.datawindow.print.preview.rulers = "yes" //预览时有标尺
dw_1.object.datawindow.print.orientation = 1 //打印时横向
dw_1.object.datawindow.print.orientation = 2 //打印时纵向
dw_1.object.datawindow.print.paper.size = 9 //设置纸张大小为"A4"
dw_1.object.datawindow.print.paper.size = 8 //A3
dw_1.object.datawindow.print.paper.size = 12 //B4
dw_1.object.datawindow.print.paper.size = 13 //设置纸张大小为"B5"[A3是8]
dw_1.object.datawindow.print.color = 1 //单色
dw_1.object.datawindow.print.color = 2 //彩色
dw_1.object.datawindow.print.page.rangeinclude = 0 //打印所有页
dw_1.object.datawindow.print.page.rangeinclude = 1 //打印偶数页
dw_1.object.datawindow.print.page.rangeinclude = 2 //打印奇数页
dw_1.object.datawindow.print.filename = "fileName"//打印到文件
dw_1.describe('datawindow.printer') //当前打印机
dw_1.object.datawindow.print.preview = "yes" //打印预览dw_1.object.datawindow.print.preview.zoom = 25 //打印预览时的百分比大小dw_1.object.datawindow.print.margin.top = 100 //上页边距1厘米dw_1.object.d
<!--
打印
机按钮开始 -->
<div style="position: absolute;top:100;right:0px;z-index: 9999;background-color:#EDEDED">
var footstr = "";
var newstr = document.all.item(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr+f
window.print()的使用
整体
打印
隐藏掉不需要的结构
document.getElementsByClassName('xmbz')[0].style.display='none';
document.getElementsByClassName('reason')[0].style.display='none';
document.getElementBy...