怎样让一个IE窗口自动关闭而不出现是否关闭页面的提示?

使用close()命令在关闭主窗口时会出现是否关闭的提示,怎样让这个提示不出现?
---------------------------------------------------------------

window.opener=null;window.close();
---------------------------------------------------------------

1<script>   
2window.opener=null   
3window.close();   
4</script>

必须在IE5.5以上版本有效
---------------------------------------------------------------

//IE6+SP1以下有效

1<object classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" id="closeit">
2<param name="Command" value="Close"/></object>
1<a href="javascript:closeit.Click()">点这里关闭窗口</a>

//IE5.5以上有效

1<input onclick="window.opener='null';window.close()" type="button" value="关闭"/>

//IE5.5以上有效

1<object classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" id="WebBrowser" width="0"></object>
1<input onclick="document.all.WebBrowser.ExecWB(45,1)" type="button" value="关闭窗口"/>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus