rrrrrrrrrrrrrrrrrrrrrrrrrrrrr
r
r
dd
ddddddd
ddddddd
r
r
1
2
2
3
4
5
6
7
r8
9
r0
function startmarquee(lh,speed,delay){
var t;
var oHeight = 210; /**//** div的高度 **/
var p=false;
var o=document.getElementById("show");
var preTop = 0;
o.scrollTop = 0;
function start(){
t=setInterval(scrolling,speed);
// o.scrollTop += 1;
}
function scrolling(){
// alert()
// if(o.scrollTop%lh!=0 && o.scrollTop%(o.scrollHeight-oHeight-1)!=0){
if( o.scrollHeight-o.offsetHeight
preTop = o.scrollTop;
o.scrollTop+=1;
if(preTop >= o.scrollHeight || preTop==o.scrollTop){
o.scrollTop = 0;
}
}else{
// clearInterval(t);
// setTimeout(start,delay);
}
o.scrollTop+=1
}
setTimeout(start,delay);
}
startmarquee(20,20,500);
/**//**startmarquee(一次滚动高度,速度,停留时间);**/
other: