为啥执行不出来啊啊啊啊啊
<script type="text/javascript">
window.onload=function() {
var oLi = document.getElementsByTagName('li');
for (var i = 0; i < oLi.length; i++) {
oLi[i].timer=null;
oLi[i].onmousemove = function () {
startMove(This, 600);
}
oLi[i].onmouseout = function () {
startMove(This, 300)
}
}
//var timer=null;
function startMove(obj,iTarget) {
clearInterval(obj.timer);
obj.timer=setInterval(function () {
var speed=(iTarget-obj.offsetWidth)/8;
speed= speed>0?Math.ceil(speed):Math.floor(speed);
if(obj.offsetWidth == iTarget){
clearInterval(obj.timer);
}else{
obj.style.width=obj.offsetWidth+speed+'px';
}
},30)
}
}
</script>