marqueesHeight = 153 ; //这个数值控制滚动的高度 要配合网页的设计 stopscroll = false ; with (icefable1) ... { //icefable1是可滚动div的Id style.width=666; //这个设置配合div的宽度 style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false"); } preTop = 0 ; currentTop = marqueesHeight; stoptime = 0 ; icefable1.innerHTML += icefable1.innerHTML; function init_srolltext() ... { icefable1.scrollTop=0; setInterval("scrollUp()",1); //设置刷新定时器 } init_srolltext(); function scrollUp() ... { if(stopscroll==true) return; currentTop+=1; if(currentTop==marqueesHeight+1) ...{ stoptime+=1; currentTop-=1; if(stoptime==750) ...{ currentTop=0; stoptime=0; } } else ...{ preTop=icefable1.scrollTop; icefable1.scrollTop+=1; if(preTop==icefable1.scrollTop)...{ icefable1.scrollTop=marqueesHeight; icefable1.scrollTop+=1; } } } init_srolltext(); 实例请看网页 http://www.17tennis.com 首页的教练风采板块