#12005/10/16 9:43:46
<html>
<head>
<script language=javascript>
<!--
msg=new Array(3);
msg[0]="hello";
msg[1]="everybody";
msg[2]="good luck";
interval=100;
seq=0;
i=0;
function scroll(){
document.tmform.tmtext.value=msg[i].substring(0,seq+1);
seq++;
if (seq>=msg[i].length){seq=0;i++;interval=900}
if (i>3){i=1};
window.setTimeout("scroll()",interval);
interval=100;
}
//-->
</script>
</head>
<body onload="scroll()">
<form name=tmform>
<p><input type=text name=tmtext size=15></p>
</form>
</body>
</html>
上面是一段跑马灯的代码,运行的时候只能显示一次,然后就提示错误,高手帮我看看哪儿有问题?