firefox 关于非标准属性值的读取与ie的区别

在ie中,obj.setAttribute("")obj.setAttribute("a","b")<==>obj.a="b"; obj.getAttribute("a")<==>obj.a;
而在firefox 中,obj.setAttribute("")obj.setAttribute("a","b")<≠>obj.a="b"; obj.getAttribute("a")<≠>obj.a;
示例:

運行後的結果爲:


 

猜你喜欢

转载自lianggeblog.iteye.com/blog/1697992