“对象不支持此属性或方法"IE11 中的错误 [英] "Object doesn't support this property or method" error in IE11

查看:82
本文介绍了“对象不支持此属性或方法"IE11 中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误

严重错误:对象不支持此属性或方法 addeventlistener

Critical Error: Object doesn't support this property or method addeventlistener

在 IE 11 浏览器中访问 InfoPath 表单页面(使用启用 InfoPath 的列表表单,例如 displayifs.aspx).

while accessing the InfoPath form page (using InfoPath enabled list form e.g. displayifs.aspx) in IE 11 browser.

此错误特定于 IE 11,页面在 IE 10 及更低版本中正常打开.根据这篇 MSDN 帖子, IE 11 支持 addEventListener.

This error is specific to IE 11, the page is opening properly in IE 10 and below. According to this MSDN post, IE 11 supports addEventListener.

有人对此有想法吗?

推荐答案

不幸的是,这破坏了其他事情.这是我在另一个网站上找到的修复为我工作:

This unfortunately breaks other things. Here is the fix I found on another site that seemed to work for me:

我想将 X-UA-Compatible 保留为 "IE=8" 并将以下代码添加到母版页的底部:

I'd say leave the X-UA-Compatible as "IE=8" and add the following code to the bottom of your master page:

<script language="javascript">
    /* IE11 Fix for SP2010 */
    if (typeof(UserAgentInfo) != 'undefined' && !window.addEventListener) 
    {
        UserAgentInfo.strBrowser=1; 
    } 
</script>

这修复了 core.js 中的一个错误,该错误会错误地计算为 IE11 设置 UserAgentInfo.strBrowse=3 并因此支持 addEventListener.我不完全确定除此之外的细节,但保持 IE=8 和使用此脚本的组合对我有用.手指交叉,直到我找到下一个 IE11/SharePoint错误"!

This fixes a bug in core.js which incorrectly calculates that sets UserAgentInfo.strBrowse=3 for IE11 and thus supporting addEventListener. I'm not entirely sure on the details other than that but the combination of keeping IE=8 and using this script is working for me. Fingers crossed until I find the next IE11/SharePoint "bug"!

这篇关于“对象不支持此属性或方法"IE11 中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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