IE6和IE7中的JS执行是否存在差异?

时间:2009-10-16 19:27:25

标签: javascript

似乎是

2 个答案:

答案 0 :(得分:4)

简答,是的。

存在微妙的细微差别和实施差异。你遇到了什么问题?

答案 1 :(得分:1)

是的,尤其是在标准模式下运行的IE8中。

e.g。

//in IE6, 7, and IE8 quirks and IE8 compatibility mode, this will return
//the first element with either a 'name' or 'id' attribute value of "description"
//(CasE iNsenSiTIVE)

//in IE8 standards mode, it will return the first element with the
//EXACT id attribute value of "description"
var desc = document.getElementById('description');

使用.setAttribute()和.getAttribute()

加上许多更改