您所在的位置:小祥子 » 编程 » JavaScript » 正文

关于js中使用close方法无法关闭firefox浏览器

时间:2015-07-07 编辑:MaskO1 来源:CnBlogs

今天遇到一个问题就是在JS中使用window.close()方法无法关闭Firefox:

浏览器版本:

firefox

PHP6+/jipfDSYNv20vJKmOUb7Z3dqjGTDamcC8Q9qWzbtiyLD14wrAA1AWkos1koDA1fChCInt6+W7fnxP1XapIG27bfvfszoKy2VNfEZFo14ztz8/yy+fmFgCJev/6duycYVoDwRCANe5lisbi0vHJtOuP8AasvzKGR0bFbt+f4TioNKev+/QdT6emh4Us1/fUqAHYBSAMAQADSAAAQgDQAAAQgDQAAAUgDAEAA0gAAEIA0AAAEIA0AAAFIAwBAANIAABCANAAABCANAAABSAMAQADSAAAQiEoaskaTg5EVfkyYuYBbxLN2zkwEngcA1EAk0pAzE2VFyBqeOOTMRBP/VbnFNXnhrHozAKABRD2gyBqKxXvGXfm1jGb6XAfUewEADSBiaVA1QFMJMijQbZ+ezxpNhumNJyASAOyciKTBDQzoCiAGINzL/aUhZyYqT5KGGwCAWonYa6iEEJRgguA2BHoNunAg7ABAA4g61uCaebBfoP+bGb8mHJAGABpAFNJQmaAI8BqajCw9XZm/oLcoowgMKABoBNF4DZUcBOIqNOmpCape5FicUT6LrAYAGkDkAwoAwF4E0gAAEIA0AAAEIA0AAAFIAwBAANIAABCANAAABCANAAABSAMAQCBCaXASGI1sOQ3SP4uxnOnI0p/J5i/6Igvv8qxRbaG2koUpouw1oxQiPlevR7XC3SdqSeK8ZtL9WuaoyRpAF6Bob0N9npKXKoHU0viyR6WhmrV6FtXUZGT9Pm932ZZu5vqj3eJ9bEAxbd3KaQWJRIlVYmV40pA1EpXz1dtuZMsmXn6AaVDNUooqP05pRLhFJkQJQdzYY9JQxX8QHpFImMy6K15D2bFQ3Qiv3/R+dG0xYeZsO2ea2azp1UWVD9cWy/LiPI+0gohAOK/BuTJhZPnmFX73Oq0ot4WLiV4BYQNO5WWIJMwspCHeRCANcretfpQ5d12l73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PtN2G85mIUUOQaUiPFeD0MwDAajwjPkDrp5lfesR0nr0eoNMl6FRsrK5tKuToCzDsc0gKFhvBvjjfthkdAetKwJ6JH81hTMxoBJmAzLECHNyBdgqAn06L0iP2Sh6el5jnTN209tA9ZN2OnhC5BG8FoDBs/oH+ZXwAQ0AAAAGUSURBVFEvYHQhgDnTbTT7mcQdkLlI4Y6AOfMeXQ2bk97rcnNyc43qAob2WqyAaVN6xDXLH3+J3QpYXQMiNrajJruqa9SkBw6rhsg3etoL9vnclQJQtwKxAjIUqd0U1EuE1GFdYBZ9r8uFFbtQCphepUfwzj5slREUJn227AhAFcVbAQP9y4wT2rc1oYv5qJ/fONiO7vnpV1mtgAj7YM4E0SOoLwB/pskfSZBZSHVcALa+hhlIbQFDPSAFTLPSI06VPLyeAm5HQMfYamPlb/IFIArWvq0J75CzHoRrfvMSo6YTDmuiHkwAQuT2zMaIw5hkRyBTkbKSITaXvUU90Egfm+O8zmoOzPTSIzPKhU4cARmNjMsRINCB3+qfhiDRgRkOQgEEBFkNQgEEBFkNQgEEBFkNQgEEBFkNQgEEBFmN9FCAj9x7/IY6AQFBcpG6bkJOCQJmJcfVEnHICYZjGh3/YqUMbN0Ox2IeFtoycZW56y/2cszXen9vggfj/n3jOOj+wPEhG66NkK0Rn5in7dTziSAW/D9ftCoTOexXiQAAAABJRU5ErkJggg==" border="0" onload="return imgzoom(this,600);"/>

一句简单的代码可实现浏览器的关闭

  <p >关闭</p> 

但测试发现:

IE能正常弹出窗口询问是否关闭窗口

而Firefox点击之后则无任何反应

难道Firefox不支持close()关闭? 我们在来测试一下使用close能不能关闭open()打开的窗口呢?

 /*index.html*/
 <script type="text/javascript">
             function op()
             {
                 window.open("test.html", "", "height=100,width=100");
             }
 </script>
 <p >打开</p>
 
 /*test.html*/
 <p >关闭</p>

测试结果:

Firefox可以关闭open()打开的窗口,但是无任何提示;IE也能正常关闭,也没有任何提示。

结论:在firefox里用window的close方法时要注意他和IE不同的地方:在父窗口打开的页面是不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BUs49xu4oTlITVIj/3QaKfDuqszi5dypbDZpZpr7l4NJRclHIGaxxMAABwHrlCmhr+YJb/lLVVjH1zBfqi2E5urDcw1uIKdYCwcWDuhuqrxFJ7dvsGYFbNTsPYhBACAAwhcoQLjb3xJTft/6RqDhM3wzwePvRMF3bksA5uwe7sfc0kkll+O/fHk65jVtAzqklGS90F+OfwlQBoAAAcKuAIAAAAAZMAVAAAAACADrgAAAAAAGXAFAAAAAMiAKwAAAABABlwBAAAAADLgCgAAAACQAVcAAAAAgAy4AgAAAABk/BcISvG6gyk/8wAAAABJRU5ErkJggg==" border="0" onload="return imgzoom(this,600);"/>

原文地址:http://zhidao.baidu.com/link?url=ouKyYZa9KAfcEst4rYk-N-KjjugyxUo5wv6aEI6gzBxONKdWBdIF9BuAt_e6DyJ-iKIY8dysRnR1UE-3sqD-0_XG2sF5OQRgfam8i8jdGHC

通过地址栏输入about:config进入配置页面搜索dom找到dom.allow_scripts_to_close_windows设置为true再测试及可关闭

但这样做感觉并不满意,就像上面说的,难道要求客户也去设置浏览器啊....

有什么好的解决办法,希望在下面留言...

关键词:使用 方法 浏览器