|
|
跑马灯六
这个跑马灯可以说是前几种的集大成,又会跑,又有打字效果,蛮花俏的,试用看看吧!
|
|
将下列紫色的地方,加进您的网页即可!
<HTML>
<HEAD>
<TITLE>跑马灯</TITLE>
</HEAD>
<SCRIPT Language="JavaScript">
var msg="欢迎光临中国网虫俱乐部 ";
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=45>
</FORM></CENTER>
</BODY>
</HTML>
|
|
|