标签:兼容 javascrip cti tco pre com return compute gets
//兼容方法获取元素样式
function getStyle(ele,attr){
if(window.getComputedStyle){
return window.getComputedStyle(ele,null)[attr];
}
return ele.currentStyle[attr];
}
标签:兼容 javascrip cti tco pre com return compute gets
原文地址:http://www.cnblogs.com/powerplay/p/7746923.html