一个简单的css属性获取函数
粉简单的代码。自己记录下
javascript代码:
function getStyle(o, a){
return o.style[a] ? o.style[a] : window.getComputedStyle ? window.getComputedStyle(o, null)[a] : o.currentStyle[a];
}
function $(id){
return document.getElementById(id);
}

