开发者

Simple command Javascript (window.close())

开发者 https://www.devze.com 2022-12-25 12:08 出处:网络
How to assure the closing of the window in the Firef开发者_如何学JAVAox with window.close command?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号