在IE9,Win 7的window.open()返回null而不是打开的窗口中参考 [英] On IE9, Win 7 window.open() returns null instead of reference of the opened window

查看:1033
本文介绍了在IE9,Win 7的window.open()返回null而不是打开的窗口中参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想类似下面,

var myWindow = null;
if(!myWindow || myWindow.closed)
{
    myWindow = window.open(url, windowId);
}
else 
{
    myWindow.focus();   
}

所有的浏览器返回窗口裁判对window.open(),但IE 9返回null。是否有人有,为什么返回null以上信息可能用于IE9一种解决方法解决呢?

All browsers return the window ref for window.open(), but IE 9 returns NULL. Does anybody have more information on why null is returned or possibly a workaround solution for IE9?

推荐答案

window.open 返回,如果启用保护模式空引用对象是在 Internet选项 - >安全 - >安全级别检查本区和ZONE是在我的情况下,本地文件不同,即从内网打开一个弹出窗口。

window.open returns a NULL reference object if Enable Protected Mode is checked under Internet Options->Security->Security Level for this zone and the ZONE is different i.e. in my case local file opening a popup from Intranet.

window.open mysite.com在弹出的窗口即打开互联网时someothersite.com返回即使启用保护模式检查参考对象 - >网络

window.open returns a reference object even if Enable Protected Mode is checked when mysite.com opens someothersite.com in popup window i.e. Internet->Internet

这篇关于在IE9,Win 7的window.open()返回null而不是打开的窗口中参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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