IE8不支持document.querySelectorAll()?

J2EE 码拜 9年前 (2015-04-13) 1532次浏览 0个评论
 

我是IE8
 
document.querySelectorAll(’link.jrWebFont’) ; 不支持此属性或方法

why?

xp sp3

IE8不支持document.querySelectorAll()?
document.querySelectorAll(’link\.jrWebFont’) ;
特殊字符转义一下试试
IE8不支持document.querySelectorAll()?
应该可以的吧,IE9都可以滴,,,
IE8不支持document.querySelectorAll()?
我试了,不是转义符的问题,是根本就没有改属性或方法。
IE8不支持document.querySelectorAll()?
我原来是IE6,后来直接装的IE8
IE8不支持document.querySelectorAll()?
以下是我的aaa.htm的全部内容,只有4行:

test
<script type=”text/javascript” >
document.querySelectorAll(“”link.jrWebFont””);
</script>

在xp sp3 / win 7 + IE8下都显示没有此方法或属性。

IE8不支持document.querySelectorAll()?
10分
document.querySelectorAll 这个html5的方法 ,不支持就换个别的方法。
IE8不支持document.querySelectorAll()?
60分
document.querySelectorAll() 是 HTML5中引入的新方法,它的使用方式与jQuery的选择器相同.
由于它是HTML5原生的方法,所以不需要添加jQuery引用。
IE8默认不支持html5.如果希望IE8支持html5,请参考 让IE浏览器支持HTML5标准的方法
IE8不支持document.querySelectorAll()?
10分
document.querySelectorAll() 是 HTML5中引入的新方法
IE8默认不支持html5
IE8不支持document.querySelectorAll()?
10分
IE本来就不支持很多东西,这也没什么好奇怪的

而且楼主说的这个方法也就支持html5的才行

如果真想用,建议客户换浏览器吧,换成支持html5的那些

IE8不支持document.querySelectorAll()?
10分
升级IE吧  这个属于很html5的东西
IE8不支持document.querySelectorAll()?
在html或jsp中添加以下代码:
<head>
<script type=”text/javascript”>
if ( !document.querySelectorAll ) {
(function(d, s) {
d=document, s=d.createStyleSheet();
d.querySelectorAll = function(r, c, i, j, a) {
a=d.all, c=[], r = r.replace(/\[for\b/gi, “”[htmlFor””).split(“”,””);
for (i=r.length; i–;) {
s.addRule(r[i], “”k:v””);
for (j=a.length; j–;) a[j].currentStyle.k && c.push(a[j]);
s.removeRule(0);
}
return c;
}
})()
}
</script>
</head>

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明IE8不支持document.querySelectorAll()?
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!