Firefox的window.opener问题 [英] Firefox window.opener issue

查看:209
本文介绍了Firefox的window.opener问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只要在右键菜单中使用在新标签中打开,window.opener在IE和Firefox中都能正常工作;错误控制台说window.opener为空。有没有其他方式的开罐器可以访问?

编辑:
错误控制台说window.opener为空,只有当在新标签打开被点击。对于所有其他情况,不存在这样的错误。因此,我想知道的是,如果除了window.opener之外的替代方案存在。

解决方案

window.opener 只有当窗口(或标签,如果它被转移到一个标签)打开 window.open 或通过一个目标属性或类似的。特别是,UI从不设置窗口的开启者。


"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.

解决方案

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.

这篇关于Firefox的window.opener问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆