The reason for this is, This method is only allowed to be called for windows that were opened by a script using the window.open method.
To get around this problem we will have to fool the firefox to thin it window is opened by window.open
We can use this code
<input type="button" name="Close"
</html>We can also write script like this
if it doesn't works
please set your firefox browser:
1.input "about:config " to your firefox address bar and enter;
2.make sure your "dom.allow_scripts_to_close_windows" is true