<script language="javascript"> var msg = "这里写你的文字" ; var interval = 120 var spacelen = 120; var space10=" "; var seq=0; function jannick2() { len = msg.length; window.status = msg.substring(0, seq+1); seq++; if ( seq >= len ) { seq = 0; window.status = ; window.setTimeout("jannick2();", interval ); } else window.setTimeout("jannick2();", interval ); } jannick2(); </script>
测试
<SCRIPT language="javascript"> <!-- function jannick3(seed) { var m1 = "第1句话"; var m2 = "第2句话"; var m3 = "第3句话"; var m4 = "第4句话"; var m5 = "第5句话,还可以自己加,记得改下面"; var msg=m1+m2+m3+m4+m5; var out = " "; var c = 1; if (seed > 100) { seed--; cmd="jannick3("+seed+")"; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 100 && seed > 0) { for (c=0 ; c < seed ; c++) { out+=" "; } out+=msg; seed--; window.status=out; cmd="jannick3("+seed+")"; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 0) { if (-seed < msg.length) { out+=msg.substring(-seed,msg.length); seed--; window.status=out; cmd="jannick3("+seed+")"; timerTwo=window.setTimeout(cmd,100); } else { window.status=" "; timerTwo=window.setTimeout("jannick3(100)",75); } } } //--> </SCRIPT>
CopyRight© 2008-2009 hao51xx.com, 本站部分资源来于网络,版权文责归原作者,对于任何事宜本站将在第一时间处理。