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.
THE END
二维码
打赏

共有 0 条评论