Today, a problem is that using the Window.close () method in JS cannot close Firefox:
Browser version:
Firefox
Ie
A simple code that enables the browser to close
1 <p onclick= "Javascript:window.close ()" > Close </p>
But the test found:
IE can pop up the window to ask whether to close the window
Firefox does not respond when clicked
Does Firefox not support close ()? We're going to test it. Can I close the open () window with close?
1 /*index.html*/2<script type= "Text/javascript" >3 functionop ()4 {5window.open ("test.html", "", "height=100,width=100");6 }7</script>8<p onclick= "OP ()" > Open </p>9 Ten /*test.html*/ One<p onclick= "Javascript:window.close ()" > Close </p>
Test results:
Firefox can close the open () window, but without any hint, ie can also shut down normally without any hint.
Conclusion: When using the Close method of window in Firefox, you should pay attention to his and ie different places: the page opened in the parent window is not available with close
There is no workaround for finding out through search engines:
Original address: Http://zhidao.baidu.com/link?url=ouKyYZa9KAfcEst4rYk-N-KjjugyxUo5wv6aEI6gzBxONKdWBdIF9BuAt_ E6dyj-ikiy8dysrnr1ue-3sqd-0_xg2sf5oqrgfam8i8jdghc
Enter About:config via the address bar into the Configuration page search Dom find dom.allow_scripts_to_close_windows set to True re-test and can be closed
But this does not feel satisfied, as said above, ask the customer also to set up a browser ah ....
What good solution, hope to leave a message below ...
About JS using the Close method cannot close the Firefox browser