<STYLE MEDIA="print">
#navmenu {display: none}
#article {width: 6.5in}
#article {height: 9.2in}
#x1 {display: none}
#x2 {display: none}
#x3 {display: none}
#divideFlagTitle {page-break-before:always}
</STYLE>
<script language="JavaScript">
functiondo
PrintSetup()
{
//打印设置
//cancelDividePage();
WB.ExecWB(8,1);
}
functiondo
PrintPreview()
{
//打印预览
//dividePage();
WB.ExecWB(7,1);
//cancelDividePage();
}
functiondo
Print()
{
//打印当前页
//dividePage();
WB.ExecWB(6,1);
//cancelDividePage();
}
</script>
然后再body中
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 WIDTH=0 HEIGHT=0 id=WB ></OBJECT>
&nbsp;&nbsp;&nbsp;<a onclick="javascript:doPrintSetup()" id="x1" style="cursor:hand;"><b>[打印设置]</b></a>
&nbsp;&nbsp;&nbsp;<a onclick="javascript:doPrintPreview()" id="x2" style="cursor:hand;"><b>[打印预览]</b></a>
&nbsp;&nbsp;&nbsp;<a onclick="javascript:doPrint()" id="x3" style="cursor:hand;"><b>[打&nbsp;&nbsp;&nbsp;&nbsp;印]</b></a>
&nbsp;&nbsp;&nbsp;<a onclick="javascript:window.close();" id="x3" style="cursor:hand;"><b>[关&nbsp;&nbsp;&nbsp;&nbsp;闭]</b></a>