title: How to open an image by clicking the image button
body: <p>I am trying to open another image when I press the image button - I am completely new to html. I heard that you need to use the onclick to get that. Here it is what I am trying:</p>
  
  <pre><code>input type="image" src="img/gallery/5.jpg" onclick="img/floor.jpg"
  </code></pre>
  
  <p>Where 5.jpg is the thumbnail view and floor.jpg is the target image (present in another directory).</p>
  
  <p>But the above piece of code is not working for me.
  What is the correct approach?</p>
  
  <p>Why this is failing  ??
  i used the solution to open a number of images </p>
  
  <pre><code> &lt;a href="img/5.jpg"&gt;&lt;img src="img/gallery/5.jpg"/&gt;&lt;/a&gt; 
              &lt;a href="img/6.jpg"&gt;&lt;img src="img/gallery/6.jpg"/&gt;&lt;/a&gt;
              &lt;a href="img/7.jpg"&gt;&lt;img src="img/gallery/7.jpg"/&gt;&lt;/a&gt;
              &lt;a href="img/8.jpg"&gt;&lt;img src="img/gallery/8.jpg"/&gt;&lt;/a&gt;
              &lt;a href="img/9.jpg"&gt;&lt;img src="img/gallery/9.jpg"/&gt;&lt;/a&gt;
              &lt;a href="img/10.jpg"&gt;&lt;img src="img/gallery/10.jpg"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>but every time it opens only the 10.jpg
  Help 
  thanks </p>