<body>
<div id="zhu">
<div id="wutai">
<img src="image/1.jpg"/>
<img src="image/2.jpg"/>
<img src="image/3.jpg"/>
<img src="image/4.jpg"/>
<img src="image/5.jpg"/>
</div>
<div id="anniu">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
<div class="clearn"></div>
</div>
</div>
<script>
var tops=document.getElementById("wutai").style.top;
var first=document.getElementById("anniu");
var tu=first.getElementsByTagName("li");
var b=1;
var curr=tu[0];
var sss;
for(var i=0;i<tu.length;i++)
{ tu[i].style.color="#96F";
tu[i].style.backgroundColor="#FFF";
(function(i){
tu[i].onmouseover=function(){
clearTimeout(sss);
var sudu=setInterval(function ab(){
b++;
b/10;
document.getElementById("wutai").style.top=-((i-1)*333+(b/10)*333)+"px";
if(b>=10)
{
clearInterval(sudu);
b=1;
}
},10);
for(var j=0;j<tu.length;j++){
tu[j].style.color="#96F";
tu[j].style.backgroundColor="#FFF";
}
this.style.color="#FFF";
this.style.backgroundColor="#96F";
curr=this;
};
tu[i].onmouseout=function(){sss=setTimeout(run,1000);};
tu[i].index=i;
})(i);
}this
sss=setTimeout(run,1000);
function run()
{ var next=curr.index+1;
if(next==tu.length)
{
next=0;
}
tu[next].onmouseover();
sss=setTimeout(run,1000);
}
</script>
</body>seo