function getStyle(obj,attr){ if(obj.currentStyle){ //for IE return obj.currentStyle[attr]; }else{ return getComputedStyle(obj,null)[attr]; } }
function getStyle(obj,attr){ if(obj.currentStyle){ //for IE return obj.currentStyle[attr]; }else{ return getComputedStyle(obj,null)[attr]; } }
转载于:https://www.cnblogs.com/sunbey/p/5138580.html