求大神帮忙看看
<script type="text/javascript"> window.onload=function(){ var odiv=document.getElementById('div1'); odiv.onmousemove=function(){startmove(10,0);} odiv.onmouseout=function(){startmove(-10,-200);} var timer=null; function startmove(){ clearInterval(timer); timer=setInterval(function(speed,iTarget){ if(odiv.offsetLeft==iTarget){clearInterval(timer)} else{odiv.style.left=odiv.offsetLeft+speed+'px'} },30) } } </script>