<html>
<head>
<title>Testin g JSP</title>
<script type="text/javascript">
var numbers = new Array("one", "two", "three", "four", "five");
function test() {
for(var i = 0; i < 5; i++) {
document.writel n("It is: " + numbers[i]);
}
}
</script>
</head>
<body onload="test()" >
</body>
</html>
When i run this, it outputs "It is: one" and then complains that the
varibale numbers is undefined???
Why does it do this?
Thanks
<head>
<title>Testin g JSP</title>
<script type="text/javascript">
var numbers = new Array("one", "two", "three", "four", "five");
function test() {
for(var i = 0; i < 5; i++) {
document.writel n("It is: " + numbers[i]);
}
}
</script>
</head>
<body onload="test()" >
</body>
</html>
When i run this, it outputs "It is: one" and then complains that the
varibale numbers is undefined???
Why does it do this?
Thanks
Comment