开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜