title: How to show multiple images using only one image tag?
body: <p>I am currently having problem displaying multiple images using only one <code>img</code> tag and whose <code>src</code> is changed continuously. Here is my code:</p>
  
  <pre><code>&lt;script&gt;
    var i=0;
  
    function swapImage() {
      document.slide.src = 'image'+i+'.jpg';
  
      i++; 
      setTimeout('swapImage()',3000);
    }
  
  &lt;/script&gt;
  &lt;img class='materialboxed' width='350px' height='250px' src='CCTV.jpg' name='slide'&gt;
  </code></pre>
  
  <p>But my code only displays one image then shows it in a kind of slideshow but rather i want to display all of them at once in a kind of for and while loop if possible.</p>