<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
</head>
<body onload="startTime();">
<img id="YOurImage1" />
<script>
var imgArray = new Array("Your Image1","YourI mage2","Your Image3"); /*Any number of sequentially connected images*/
var imgCount = 0;
function startTime() {
if(imgCount == imgArray.length) {
imgCount = 0;
}
document.getElementById("img1").src = imgArray[imgCount];
imgCount++;
setTimeout("startTime()",100 /*time delay(in millieconds)*/);
}
</script>
</body>
</html>
No comments:
Post a Comment