打印预览点叉之后关闭按钮就不好使了,高手帮解决
<head runat= "server ">
<title> Untitled Page </title>
<STYLE TYPE= "text/css ">
@media print{
.print {display:block;}
.notPrint {display:none;}
}
</STYLE>
<script language= "javascript ">
function printsetup()
{
wb.execwb(8,1);
}
function printpreview()
{
wb.execwb(7,1);
}
function printit()
{
if (confirm( '确定打印吗? ')==true)
{
wb.execwb(6,1);
}
else
{
return false
}
}
</script>
</head>
<body>
<OBJECT classid= "CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 " height=0 id=wb name=wb width=0> </OBJECT>
<span class= "notPrint "> <asp:Button ID= "btok " runat= "server " Text= "关闭 " OnClientClick= "javascript:window.close(); "/> </span>
</body>
打印预览点close之后关闭按钮好使,点右上角的叉后关闭按钮就不好使了
------解决方案--------------------程序逻辑问题
因为OnClientClick= "javascript:window.close(); "是在关闭按钮事件里所以点右上角的叉后
就失效了。
------解决方案--------------------function printit()
{
if (confirm( '确定打印吗? ')==true)
{
wb.execwb(6,1);
}
else
{
//return false;屏蔽掉这行
}
}