asp.net前臺使用的一些JavaScript代碼為什么沒有作用?
前臺代碼如下,想實現的功能為 "在tmText裏逐條顯示makearray[]裏的記錄 ":
<%@ Page language= "c# " Codebehind= "english.aspx.cs " AutoEventWireup= "false " Inherits= "MyWeb.english " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN " >
<HTML>
<HEAD>
<title> english </title>
<meta name= "GENERATOR " Content= "Microsoft Visual Studio .NET 7.1 ">
<meta name= "CODE_LANGUAGE " Content= "C# ">
<meta name= "vs_defaultClientScript " content= "JavaScript ">
<meta name= "vs_targetSchema " content= "http://schemas.microsoft.com/intellisense/ie5 ">
<script language= "javascript ">
<!--
function makearray(size)
{
this.length=size;
for(i=1;i <=size;i++)
{
this[i]=0
}
return this;
}
msg=new makearray(3)
msg[2]= "AAA "
msg[1]= "BBB ";
msg[3]= "CCC "
interval = 100;
seq = 0;
i=1;
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 " method= "post " runat= "server ">
<div align= "center "> <center> <p> <input type= "text " name= "tmText " size= "40 ">
</p>
</center>
</div>
</form>
</FORM>
</body>
</HTML>
------解决方案--------------------把那段网页有误的代码贴出来