JQuery 1.8.3对IE9兼容问题getAttribute

时间:2014-12-05 12:37:07   收藏:0   阅读:151

jQuery1.8.3在IE9下attr报错问题

jQuery1.8.3在IE9中attr方法保存。

解决方案如下:

r = e.getAttribute(n);

 修改为:

r = e.getAttribute ? e.getAttribute(n) : null;

根据不同版本修改的行数不一样,依实际情况而定

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!