多物体运动传入obj问题
for (var i = 0; i < aLi.length; i++) {
aLi[i].timer = null;
aLi[i].onmouseover = function () {
startMove(ali[i], {width:400, height:200});
}
aLi[i].onmouseout = function () {
startMove(aLi[i], {width:200, height:100});
}
}
当这样传入aLi[i]时,浏览器会报错TypeError: Cannot read property 'timer' of undefined
而当传入this时,就不会存在这个问题