各路大神解答
<script type="text/javascript">
window.onload=function(){
var li=Document.getElementsByTagName("ali");
ali.onmousemover()=function(){
startMove(10,400);
}
ali.onmouseout=function(){
startMove(-10,200);
}
}
var timer=null;
function stratMove(speed,iTarget){
clearInterval(timer);
var ali=document.getElementsByTagName("ali");
timer=setInterval(function(){
if(ali.offsetwidth==iTarget){
clearInterval(timer);
}
else{
ali.style.width=ali.offsetwidth+speed+'px';
}
},30)
}
</script>