Implementation Code of javascript text scrolling pause Effect
Intermittent rolling _ www.jb51.net _ script house
Intermittent-1-caiying2007
Intermittent-2-caiying2007
Intermittent-3-caiying2007
Script
Var Mar = document. getElementById ("Marquee ");
Var child_p = Mar. getElementsByTagName ("p ")
Var picH = 60; // move the height
Var scrollstep = 3; // move the stride, the larger the faster
Var scrolltime = 20; // The slower the moving frequency (in milliseconds ).
Var stoptime = 3000; // interval (MS)
Var tmpH = 0;
Mar. innerHTML + = Mar. innerHTML;
Function start (){
If (tmpH <picH ){
TmpH + = scrollstep;
If (tmpH> picH) tmpH = picH;
Mar. scrollTop = tmpH;
SetTimeout (start, scrolltime );
} Else {
TmpH = 0;
Mar. appendChild (child_p [0]);
Mar. scrollTop = 0;
SetTimeout (start, stoptime );
}
}
Onload = function () {setTimeout (start, stoptime )};
Script