My html file is :
My html file is :
<!Doctype >
<html>
<head>
<script type="text/javascript" src="my-slide.js"></script>
<!--- name of javascript file is my-slide.js-->„³
</head>
<body>
<img src="map-image1.gif" name="slide" width="100%" height="368" />
<!--- The image above is in same folder as the html and javascript
file are.-„³
</body>
</html>
The javascript file is here:
var numImages = 3;
var images = [];
for (var i = 0; i < numImages; ++i) {
var image = new Image();
image.src = 'map-image1' + (i + 1) + '.gif';
images.push(image);
}
var step = 0;
function slideit() {
if (! document.images) {
return;
}
document.images.slide.src = images[step].src;
step = (step + 1) % numImages;
}
setInterval(slideit, 2500);
I have 3 images in that folder which are
called(map-image1.gif,map-image2.gif, map-image3.gif) why my slide show
doesn¡¦t work and show just one of them and nothing else .I am
frustrated,please help me. Thanks in advance
No comments:
Post a Comment