JavaScript如何获取一个元素的样式信息
跨浏览器方法 function getStyle(elem, cssprop, cssprop2){ if(elem.currentStyle){ return elem.currentStyle[cssprop] }else if(document.defaultView && document.defaultView.getComputedStyle){ return document.defaultView.getComputedStyle(elem, "").getPropertyValue(cssprop2) }else{ return null } } &
下载地址
用户评论