Switch to full style
JavaScript code examples
Post a reply

image slide show

Wed Sep 14, 2011 12:25 am

Image slider show
Code:
<html>
<
title>Images ImagesSlides</title>
<
script language="JavaScript" type="text/javascript">
var imgsSlider = new Array('1.jpg','2.jpg','1.jpg','3.jpg','3.jpg');
var iteration = 0;
var size=4;
    function imageSlider(){  

        if 
(iteration <=size)
            {  
                iteration 
++;
            }else if(iteration>size){
                iteration=0;
            }
     
  
// set the image in the slide show.
  document.getElementById("sliders").innerHTML = "<img src=\""+imgsSlider[iteration]+"\" width=200 height=200 >";
  // sleep for two seconds.
  setTimeout("imageSlider()", 2000);  
    
}  
</script>
<div id="sliders" />
 <script>imageSlider();</script>
</div>

 
</body>
</html>




Post a reply
  Related Posts  to : image slide show
 html slide show images     -  
 Show image using before property     -  
 Show loading image from JQuery     -  
 show the locations of clicks on the image     -  
 Show image when click on link     -  
 How to show full resolution image at clicking on thumnail     -  
 Slide UP-Down Chaining     -  
 slide down using JQuery     -  
 java slide not comming up     -  
 Slide automatically-specific speed to a determined position     -  

Topic Tags

JavaScript Image