为啥使用obj.style[filter]在浏览器里会报错,obj.style[filter]和obj.style.filter不是一样的吗?报错说obj.style[filter]未定义?
if (atr=="opacity") {
obj.style[atr]=(cur+speed)/100;
console.log(obj.style.filter);
console.log(obj.style[filter]);
obj.style.filter='alpha(opacity:'+cur+speed+')';
//obj.style[filter]='alpha(opacity:'+cur+speed+')';
}else{
obj.style[atr]=cur+speed+"px";
}