Javascript 当您收到消息“对象不支持此属性或方法”时,您如何找出“对象”是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5983343/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 19:45:01  来源:igfitidea点击:

When you get the message "Object doesn't support this property or method", how do you find out what "Object" is?

javascriptinternet-explorerobject

提问by David Rhoden

When you get the IE error message "Object doesn't support this property or method", how do you figure out what "Object" is? Is it always the same thing? If not, is there a way to use the diagnostic tools or the console to figure out what it is?

当您收到 IE 错误消息“对象不支持此属性或方法”时,您如何确定“对象”是什么?总是一样的吗?如果没有,有没有办法使用诊断工具或控制台来找出它是什么?

采纳答案by jimbo

To get at IE's debugging information, you have to enable script debugging:

要获得 IE 的调试信息,您必须启用脚本调试:

  1. In Internet Explorer, choose Internet Options from the Tools menu.
  2. In the Internet Options dialog box, click the Advanced tab.
  3. On the Advanced tab, under Browsing, clear Disable Script Debugging.
  4. Click OK.
  1. 在 Internet Explorer 中,从工具菜单中选择 Internet 选项。
  2. 在 Internet 选项对话框中,单击高级选项卡。
  3. 在高级选项卡上的浏览下,清除禁用脚本调试。
  4. 单击确定。

http://msdn.microsoft.com/en-us/library/ms241741%28v=vs.80%29.aspx

http://msdn.microsoft.com/en-us/library/ms241741%28v=vs.80%29.aspx

If you have IE 8 or above, you can use their developer tools to debug:

如果您有 IE 8 或更高版本,您可以使用他们的开发人员工具进行调试:

http://msdn.microsoft.com/en-us/library/dd565625%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/dd565625%28v=vs.85%29.aspx

回答by Jay Na

I had the same issue and same message. It turns out the issue is not with coding but with settings of IE. All I had to do was reset IE from Tools => internet options => advanced => reset (including personal settings) That did it for me. Let me know if it works.

我有同样的问题和同样的消息。事实证明,问题不在于编码,而在于 IE 的设置。我所要做的就是从工具 => 互联网选项 => 高级 => 重置(包括个人设置)重置 IE,这对我来说就完成了。让我知道它是否有效。

回答by intrigued2

I had the same problem and it was resolved by deselecting 'Enable native XMLHTTP support' in Internet Options (Tools>Internet Options>Advanced>Security)

我遇到了同样的问题,通过在 Internet 选项(工具>Internet 选项>高级>安全)中取消选择“启用原生 XMLHTTP 支持”解决了这个问题

回答by J Doe

I had this issue due to IE GPO,

由于 IE GPO,我遇到了这个问题,

strangely enough; IE's addon management GPO breaks MMC and *.MSC.

很奇怪的是; IE 的插件管理 GPO 打破了 MMC 和 *.MSC。

GPO\Administrative Templates\Windows Components\Internet Explorer\Security Features\Add-on Management\All Processes(enabled) Results in,

GPO\Administrative Templates\Windows Components\Internet Explorer\Security Features\Add-on Management\All Processes(启用)导致,

An Error has occurred in the script on this page.

此页面上的脚本中发生错误。

Line: 5
Char: 5
Error: Object doesn't support property or method 'ConnectTo'
Code: 0
URL: res://C:\WINDOWS\system32\mmcndmgr.dll/views.js

More on that here.

更多关于这里