title: onclick add image to div
body: <p>I am trying to get image in a <code>&lt;div&gt;</code> using <code>onclick</code>. </p>
  
  <p>Now I am getting the text on click. but I want to get the image in div on click...</p>
  
  <p>How can i do this...?</p>
  
  <p>Here is code I have implemented,,</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;script&gt;
  function myFunction()
  {
  document.getElementById("surprise").innerHTML=images/aftersurprise.png;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>When I click on element I should get the <code>aftersurprise.png</code> image on surprise element...</p>