字符由左邊逐個顯示,有點打字的感覺
發(fā)布時間:2008-12-20 閱讀數(shù): 次 來源:網(wǎng)樂原科技
要完成此效果把如下代碼加入到區(qū)域中
<script language="JavaScript">
var msg = "歡迎來到細(xì)溪驛站,請多提意見。謝謝! " ;
var interval = 120
var spacelen = 120;
var space10=" ";
var seq=0;
function Scroll() {
len = msg.length;
window.status = msg.substring(0, seq+1);
seq++;
if ( seq >= len ) {
seq = 0;
window.status = '';
window.setTimeout("Scroll();", interval );
}
else
window.setTimeout("Scroll();", interval );
}
Scroll();
</script>