< html > < body > < div id = " div1 " style = " overflow:hidden;height:18px " > < div id = " div2 " > < div id = " div3 " > aaaaaa </ div > < div id = " div4 " > bbbbbb </ div > < div id = " div5 " > cccccc </ div > </ div > < div id = " div5 " > aaaaaa </ div > </ div > </ body ></ html > < script language = " JavaScript " > window.onload = init; function init() ... {obj1=document.getElementById("div1");obj2=document.getElementById("div2");obj3=document.getElementById("div3");obj4=document.getElementById("div4");move();} function move() ... {obj1.scrollTop++;window.status=obj1.scrollTop+"-"+obj2.offsetHeightif(obj1.scrollTop>=obj2.offsetHeight)...{obj1.scrollTop-=obj2.offsetHeight}time=setTimeout("move()",20)if(obj1.scrollTop%18==17)...{clearTimeout(time);setTimeout("move()",2000)}} </ script >