javascript打字机形式特效程序那里出错了?

来源:百度知道 编辑:UC知道 时间:2024/06/01 06:23:36
大家帮我看看,这个程序只显示一边就不再循环了,检查了好几遍就是发现不了错误在那里:
<html>
<head>

<script language="javascript">
var max=0;
msgkeeptime=60;
typeinterval=400;
tt=new Array("年时的不是","巴萨萨克达时","刻刷卡打卡时间");
function msglist(){
max=msglist.arguments.length;
for(i=0;i<max;i++)
this[i]=msglist.arguments[i];
}

var x=0;
var pos=0;
var w=tt[0].length;

function mt(){

document.all.msgbox.value=tt[x].substring(0,pos)+"_";
pos++;
if(pos==w){
pos=0;
++x;
w=tt[x].length;
if(x==max)
x=0;

setTimeout("mt()",msgkeeptime);}

else
setTimeout("mt()",typeinterval);}

</script>
</head>
<body onLoad="mt()"text="#ffffff">
<table border=1 width="38%"cellspaceing="0"cellpadding="0"borderco

<html>
<head>

<script language="javascript">
msgkeeptime=60;
typeinterval=400;
tt=new Array("年时的不是","巴萨萨克达时","刻刷卡打卡时间");

var x=0;
var pos=0;
var w=tt[0].length;

function mt(){

document.all.msgbox.value=tt[x].substring(0,pos)+"_";
pos++;
if(pos>w){
pos=0;
++x;
if(x==tt.length)
x=0;
w=tt[x].length;

setTimeout("mt()",msgkeeptime);}

else
setTimeout("mt()",typeinterval);}

</script>
</head>
<body onLoad="mt()"text="#ffffff">
<table border=1 width="38%"cellspaceing="0"cellpadding="0"bordercolorlight="#000000"bgcolor="#808080"height="0">
<tr><td width="100%"><b><<<</b></td></tr>