javascript 对象不支持 IE 10 中的属性或方法“querySelector”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25565032/
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-10-28 04:40:55  来源:igfitidea点击:

Object doesn't support property or method 'querySelector' in IE 10

javascripthtmlangularjsinternet-explorer

提问by Wicked Programmer

I encounter a problem with IE 10 regarding its support. The website is very good to use in other browser except IE.. I also tried using IE 11 and still it didn't work.

我在 IE 10 的支持方面遇到了问题。该网站非常适合在除 IE 之外的其他浏览器中使用。我也尝试使用 IE 11,但仍然无法正常工作。

I used angularJS and IE could not recognize querySelector..

我用 angularJS 和 IE 无法识别querySelector..

Can anyone have an idea how to solve this one? Please help me..

谁能知道如何解决这个问题?请帮我..

The version of of my AngularJS is v1.2.22

我的 AngularJS 的版本是 v1.2.22

I attached my error message

我附上了我的错误信息

enter image description hereenter image description here

在此处输入图片说明在此处输入图片说明

Thank you so much for helping me..

非常感谢你帮助我..

UPDATE

更新

Through the help of Syed Ali TaqiI already passed that error by Deleting all history, and cookies and resetting the settingsbut i got a new problem and it is like this

通过删除所有历史记录和cookies并重置设置Syed Ali Taqi我已经通过了该错误,但我遇到了一个新问题,就像这样

[$rootScope:inprog] http://errors.angularjs.org/1.2.22/$rootScope/inprog?p0=%24digest

[$rootScope:inprog] http://errors.angularjs.org/1.2.22/$rootScope/inprog?p0=%24digest

enter image description here

在此处输入图片说明

I wonder why the IE error that part but not in other browser like Chrome and firefox.. I am very sensitive in compatibility of site to all browser because we cannot dictate the user what browser to use..

我想知道为什么 IE 错误会出现在其他浏览器(如 Chrome 和 firefox)中,而不是在其他浏览器中。

Please anyone can help me

请任何人都可以帮助我

回答by Syed Ali Taqi

This should solve the problem:

这应该可以解决问题:

  • Delete all History
  • Clear Cookies
  • Reset IE settings
  • 删除所有历史记录
  • 清除Cookies
  • 重置 IE 设置

回答by Knútur ó

I think it's something else that is fails. http://caniuse.com/#feat=queryselectoraccording to that the support should be there in IE10.

我认为这是失败的另一件事。http://caniuse.com/#feat=queryselector根据 IE10 中应该有支持。

Make sure the IE is not using any compatability mode to view your site. Goto Settings > compatatibilty mode > make sure display intranet sites in compatability mode is NOT checked.

确保 IE 没有使用任何兼容模式来查看您的站点。转到设置 > 兼容模式 > 确保未选中在兼容模式下显示 Intranet 站点。

回答by Avinash Dubey

please see the IE9 equivalent of querySelectorAlland check the compatibility mode of your IE browser also.

请查看IE9 等效的 querySelectorAll并检查您的 IE 浏览器的兼容模式。

回答by David Bradley

This can be caused by IE's compatibility mode. You can go under Compatibility View Settings and see if your sites domain is listed.

这可能是由 IE 的兼容模式引起的。您可以在兼容性视图设置下查看您的站点域是否已列出。