js打印web页面代码脚本错误 'WB'未定义
<scriptlanguage="javascript">functionprintsetup(){//打印页面设置WB.execWB(8,1);}functionpri...
<script language="javascript">
function printsetup(){
// 打印页面设置
WB.execWB(8,1);
}
function printpreview(){
// 打印页面预览
WB.execWB(7,1);
}
function printit()
{
if (confirm('确定打印吗?')){
WB.execWB(6,6);
}
}
</script>
aspx里:
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WB name=WB width=0 VIEWASTEXT>
</OBJECT><input class="btnSubmit" id="d1" onclick="javascript:printit();" type="button" value="打印"
name="button_print" runat="server"><input class="btnSubmit" id="d2" onclick=" javascript:printsetup();" type="button" value="打印页面设置"
name="button_setup" runat="server"><input class="btnSubmit" id="d3" onclick="javascript:printpreview();" type="button" value="打印预览"
name="button_show" runat="server">
不可以 展开
function printsetup(){
// 打印页面设置
WB.execWB(8,1);
}
function printpreview(){
// 打印页面预览
WB.execWB(7,1);
}
function printit()
{
if (confirm('确定打印吗?')){
WB.execWB(6,6);
}
}
</script>
aspx里:
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WB name=WB width=0 VIEWASTEXT>
</OBJECT><input class="btnSubmit" id="d1" onclick="javascript:printit();" type="button" value="打印"
name="button_print" runat="server"><input class="btnSubmit" id="d2" onclick=" javascript:printsetup();" type="button" value="打印页面设置"
name="button_setup" runat="server"><input class="btnSubmit" id="d3" onclick="javascript:printpreview();" type="button" value="打印预览"
name="button_show" runat="server">
不可以 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询