Image Slider


I have slpxx.png images in my folder


<html>
<script language="JavaScript">
var i = 0;
var path = new Array();

// LIST OF IMAGES
path[0] = "slp17.png";
path[1] = "slp18.png";
path[2] = "slp19.png";

function swapImage()
{
   document.slide.src = path[i];
   if(i < path.length - 1) i++; else i = 0;
   setTimeout("swapImage()",1000);
}
window.onload=swapImage;
</script>
<img height="200" name="slide" src="slp17.png" width="400" />
</html>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.