以下是代码片段:
<SCRIPT LANGUAGE="JavaScript"> <!-- function scroll(seed) { var m1 = "深圳市锐奇网讯" var m2 = "!" var msg=m1+m2; var out = " "; var c = 1; if (seed > 100) { seed--; var cmd="scroll(" + seed + ")"; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 100 && seed > 0) { for (c=0 ; c < seed ; c++) { out+=" "; } out+=msg; seed--; var cmd="scroll(" + seed + ")"; window.status=out; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 0) { if (-seed < msg.length) { out+=msg.substring(-seed,msg.length-100); seed--; var cmd="scroll(" + seed + ")"; window.status=out; timerTwo=window.setTimeout(cmd,100); } else { window.status=" "; timerTwo=window.setTimeout("scroll(100)",7); } } } rONE=window.setTimeout('scroll(100)',50); //--> </SCRIPT>
|