Firefox window.opener issue

我是研究僧i 提交于 2019-12-07 13:15:45

问题


"window.opener" works fine in both IE and Firefox as long as 'Open in New Tab' is used from the right-click menu; Error console says "window.opener" is null. Is there any other way the opener can be accessed?

Edit: Error console says "window.opener" is null only when "Open in New Tab" is clicked. For all other cases, there is no such error. Hence, what i would like to know is if an alternate other than "window.opener" exists.


回答1:


window.opener only works if the window (or tab, if it was diverted into a tab) was opened with window.open or via a target attribute or similar. In particular, the UI never sets the opener of a window.




回答2:


it's window.open() IIRC



来源:https://stackoverflow.com/questions/944066/firefox-window-opener-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!