function getAttr(obj,attrName){
var obj=document.getElementById(obj);
if(obj.currentStyle){
return obj.currentStyle[attrName]; //兼容IE
}else{
return getComputedStyle(obj,false)[attrName]; //兼容FF
}
}
您可能感兴趣的文章: