What is wrong with this HTML code?

Daniel

New member
<html>
<head>
<title>JavaScript Activity #9</title>
<script>
imgArray = new Array(4);
imgArray[0] = new Image;
imgArray[0].src = "lions.gif";
imgArray[1] = new Image;
imgArray[1].src = "tigers.gif";
imgArray[2] = new Image
imgArray[2].src = "bears.gif";
imgArray[3] = new Image;
imgArray[3].src = "ohmy.gif";
index = 0;

function select()
{
index=Math.floor(random()*4);
document.banner.src=imgArray[index].src;
setTimeout("select()",2000);
return;
}
</script>
</head>
<body onLoad="cycle();">
<center>
<img src="lions.gif"
name="banner"
width=400
height=100>
</center>
</body>
</html>
It simply appears as a blank box with a red X on the top left corner. And thanks guys for the help-God Bless
 
Back
Top