Heres the code:
Expand|Select|Wrap|Line Numbers
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>HomeArray</title>
- </head>
- <body onLoad="slideshow()">
- <script language="JavaScript">
- pix = new Array();
- pix[0] = "cat.jpg";
- pix[1] = "cat1.jpg";
- pix[2] = "cat2.jpg";
- pix[3] = "cat3.jpg";
- var i = 0;
- function slideshow(){
- setInterval("change()", 1000);
- }
- function change(){
- document.images.pic.src = pix[i];
- i = i + 1;
- if (i > (pix.length-1)) {i = 0}
- }
- </script>
- <DIV style="position: absolute; top:00px; left:00px; border:0px solid brown;">
- <img name="pic" src=change() width=308>
- </DIV>
- </body>
- </html>