Simple command Javascript (window.close())
How to assure the closing of the window in the Firef开发者_如何学JAVAox with window.close
command?
How assure the closing of the window in the firefox with window.close command?
You can't. If you try window.close()
in a window you didn't open programmatically, the user will (fortunately!) be asked whether they really want to close the window. There's no way around that.
You can use this:
<a href="javascript:;" onclick="javascript:window.close();">
Even when the page is not opened by window.open, you can use this. I've tested it and it works for me.
精彩评论