调用window.open()在IE 11 + Windows 8.1 Preview上返回null

调用window.open()在IE 11 + Windows 8.1 Preview上返回null

问题描述:

我正在做这样的事情,其中​​MyConfig是一个aspx页面。

I am doing somethig like this,where MyConfig is a aspx page.

   winOpen=window.open('/Account/Register','MyConfig','toolbar=no,status=no,location=no,menubar=0,resizable=yes,scrollbars=yes,width=' + wWidth + ',height='+ wHeight + ',top=' + wTop + ',left=' +wLeft);

winOpen.focus();

winOpen.focus();

它返回null。它在chrome + WIndows 8.1预览中工作正常,但它在IE 11中不起作用。

It returns null.It is working fine in chrome + WIndows 8.1 preview,But it is not working in IE 11.

EDIT

我在问题中添加了一行,实际上该行失败了,因为window.open()返回null,因此是winOpen.focus()。我转向兼容模式,而不是现在启动页面给我相同的WebPage错误,但我能够导航到该页面。我希望它在没有兼容模式设置的情况下工作。用户可能不知道设置。

I have added one more line in the question and actually that line is failing since window.open() return null and so is winOpen.focus().I turned to compatibility mode and than launched the page now it is giving me the same WebPage error but I am able to navigate to the page.I wanted it to work in without compatibility mode setting.user might not know the setting.

取消选中互联网选项中的启用保护模式

uncheck "Enable Protected Mode" in internet options