开发者

Detect opened windows/tabs in Firefox

I have an application window that displays a button. On button click, a new tab is opened with window.open javascript function and later I would like to be able to detect if that link is opened or not and if it is, I need to close that window. Can this be done in Firefox开发者_StackOverflow社区 ?

Thanks.


The window.open() function returns a Window object. Just call close() on it:

var childWindow = window.open(....);

...

childWindow.close();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜