调用window.open()在IE 11 + Windows 8.1 Preview上返回null [英] call to window.open() returns null on IE 11 + Windows 8.1 Preview

查看:92
本文介绍了调用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

这篇关于调用window.open()在IE 11 + Windows 8.1 Preview上返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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