其实关闭的脚本和IE浏览器都是一样的
window.open("http://www.google.com","contactWeb"+randomNumber(10000),"toolbar=0,location=0,status=0,menubar=0,scrollbars=auto,resizable=no,width="+loginWidth+",height="+loginHeight+",left="+x+",top="+y);
window.opener = null; // 关闭IE6、IE7窗口不再提示
window.open('','_top'); // 关闭IE7窗口不再提示
window.close();
但是需要做一下设置
about:config
dom.allow_scripts_to_close_windows
true
本文介绍了一种使用JavaScript关闭浏览器窗口的方法,并提供了一个具体的脚本示例。该脚本适用于IE6、IE7等浏览器版本,通过设置特定属性来避免关闭窗口时出现提示。
571

被折叠的 条评论
为什么被折叠?



