【发布时间】:2013-01-29 10:33:28
【问题描述】:
我正在尝试在 IE9 中运行的某些 JS 中获取所有类名为“video”的元素。我正在使用var videopanels = document.querySelectorAll(".video");,它在 Chrome 中运行良好。
不幸的是,当我在调试器中观看 document.querySelectorAll(".video") 时遇到此错误:
document.querySelectorAll(".video")
Object doesn't support property or method 'querySelectorAll'
Error
但是,当我在调试器中观看document(它显示为DispHTMLDocument)并打开[Methods] 列表时,我明白了
querySelectorAll()
querySelectorAll(v)
IHTMLDOMChildrenCollection
发生了什么事?为什么我可以在调试器中看到它,但(显然)没有实际调用或使用它?
【问题讨论】:
标签: javascript internet-explorer-9 getelementsbyclassname