function getStyle(obj, attr, value){
if (!value){
if (obj.currentStyle){
return obj.currentStyle(attr);
}else{
obj.getComputedStyle(attr, false);
}
}else{
obj.style[attr] = value;
}
}
时间: 2024-10-09 11:41:30