title: javascript changing images
body: <p>Hello I would like to ask your help regarding javascript code, how do I have this work? </p>
  
  <p>I have saved the images in my D drive. Do I need to change some path here: </p>
  
  <p>Thanks </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  
  &lt;!--
  var image1=new Image()
  image1.src="pic001.png"
  var image2=new Image()
  image2.src="pic002.png"
  var image3=new Image()
  image3.src="pic003.png"
  //--&gt;
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body onLoad="slidit()"&gt;
  &lt;img src="pic001.png" name="slide" width="400" height="120" /&gt;
  
  
  &lt;script&gt;
  &lt;!--
  //variable that will increment through the images
  var step=1
  function slideit(){
  //if browser does not support the image object, exit.
  if (!document.images)
  return
  document.images.slide.src=eval("images"+step+".src")
  if (step&lt;3)
  step++
  else
  step=1
  //call function "slideit()" every 1 seconds
  setTimeout("slideit()",1000)
  }
  slideit()
  //--&gt;
  &lt;/script&gt;
  
  &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>