<html><head><title>javascript打印-打印页面设置-打印预览代码</title>
<meta http-equiv=content-type content="text/html; charset=gb2312" />
<script language=javascript>
function printsetup(){
// 打印页面设置
wb.execwb(8,1);
}
function printpreview(){
// 打印页面预览
wb.execwb(7,1);
}
function printit()
{
if (confirm('确定打印吗?')) {
wb.execwb(6,6)
}
}
</script>
</head>
<body>
<div align=center>
<object id=wb height=0 width=0
classid=clsid:8856f961-340a-11d0-a96b-00c04fd705a2 name=wb></object>
<input onclick=javascript:printit() type=button value=打印 name=button_print />
<input onclick=javascript:printsetup(); type=button value=打印页面设置 name=button_setup />
<input onclick=javascript:printpreview(); type=button value=打印预览 name=button_show />
</div>
</body>
</html>
来源:https://www.cnblogs.com/zyxzhsh/archive/2010/10/16/1852922.html