<SCRIPT Language="JavaScript">
var msg="跑馬燈 6 展示區,除了打字效果外,還會移動喔!";
var interval = 100;
var space10=" ";
var seq=0;
function Scroll1() {
document.tmForm.tmText.value = msg.substring(0, seq+1);
seq++;seq++;
if ( seq >= msg.length ) { seq = 0;
window.setTimeout("Scroll2();", interval );
}
else
window.setTimeout("Scroll1();", interval );
}
function Scroll2() {
document.tmForm.tmText.value = msg.substring(seq, msg.length) +
space10 + msg.substring(0, msg.length);
seq++;seq++;
if ( seq > msg.length ) { seq = 0 };
window.setTimeout("Scroll2();", interval );
}
</SCRIPT>
<BODY OnLoad="Scroll1();"
>
<CENTER><FORM Name=tmForm>
<INPUT Type=Text Name=tmText Size=35>
</FORM></CENTER>
</BODY>
|