Richard Tyson

导航

2015年3月8日 #

兼容的获取样式的函数getStyle()

摘要: 想要得到某个元素的某个样式属性,可以用:1 1232 3 var ele = document.getElementById("div01");4 console.log(ele.style.color);但这样只能得到写在元素上的行内样式,对于link进来的样式文件或中写的样式是获取不到的。标准浏... 阅读全文

posted @ 2015-03-08 00:14 tyson 阅读(952) 评论(0) 推荐(1) 编辑