document.queryselector兼容ie8吗

不兼容。在 IE 8 浏览器中,`document.querySelector()` 和 `document.querySelectorAll()` 方法都只支持选择器的 ID 属性,不支持其他属性。如果您需要兼容 IE 8 浏览器,建议使用 jQuery 或其他库来替代,或者使用支持 IE 8 的版本。

document.querySelector() 和 document.querySelectorAll() 是用于在 DOM 元素中选择匹配指定选择器的第一个元素或多个元素的方法。它们都支持通配符,允许您选择元素 based on their attribute or class names.

版权声明:
作者:Joker 链接:https://hooper.eu.org/archives/293073
文章版权归作者所有,转载请注明出处。
THE END
分享
二维码
打赏
)">
< <上一篇
)">
下一篇>>