加入链式动画的代码后会出现一个问题:多1.js:21 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
错误提示加了注释的2行有问题!
只能有第一个动画,第二个无法进行。错误一直累计。百度没找到解决方法,求教!
op.onmouseover=function(){yd(this,"height",300,function(){yd(this,"width",400);});}
op.onmouseout=function(){yd(this,"height",150,function(){yd(this,"width",200);});}
function getStyle(obj,attr)
{
if(obj.currentStyle){return obj.currentStyle[attr];}
//else { return getComputedStyle(obj,false)[attr];}
}
//iccr=parseInt(getStyle(obj,attr));