IT 累计浏览 1,882 不要用setAttribute设置className 创建了一个新的元素,然后添加class,发现用setAttribute("class", "foo")这种方式在IE6下不起作用。