lethalweapons1
01-11-2005, 10:38 PM
I just started trying to learn javascript and copied this example from a book. I keep getting the '800a0401' Expected end of statement error for this line:
var myNumber; (the entire code is below)
Does anyone know why I get this error. I'm trying to get a basic bit of code to work, then move on to other more complicated coding.
Thanks!
<html>
<head>
<title>My Number was 101</title>
</head>
<body>
<%
var myNumber;
for (myNumber = 1; myNumber <= 10; myNumber++)
{
%>
<P>
<STRONG>The Number this time is <%=myNumber%></STRONG>
</P>
<%
}
%>
</body>
</html>
var myNumber; (the entire code is below)
Does anyone know why I get this error. I'm trying to get a basic bit of code to work, then move on to other more complicated coding.
Thanks!
<html>
<head>
<title>My Number was 101</title>
</head>
<body>
<%
var myNumber;
for (myNumber = 1; myNumber <= 10; myNumber++)
{
%>
<P>
<STRONG>The Number this time is <%=myNumber%></STRONG>
</P>
<%
}
%>
</body>
</html>