求解:多物体动画没有效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
window.onload=donghua;
function donghua(){
var duix=document.getElementsByTagName("div");
for(var i=0;i<duix.length;i++){
duix[i].style.width=100+"px";
duix[i].style.border="1px solid red";
duix[i].style.height="100px"
duix[i].onmouseover=move(this);
}}
var timer=null;
function move(xx){
clearInterval(xx.timer);
xx.timer=setInterval(function(){
var cc= parseInt(xx.offsetWidth);
if(cc<200){
cc++;
}
xx.style.width=cc+"px";
},10)
}
</script>
</head>
<body>
<div>动画测试一</div>
<div>动画测试二</div>
<div>动画测试三</div>
</body>
</html>