title: How to use image onclick event
body: <p>I 've got an image in my application. I try to change this image to another by onclick event, but I don't know why it doesn't work. 
  Here is my code:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div&gt; 
    &lt;img onclick="click()" src="http://chittagongit.com//images/smile-icon/smile-icon-6.jpg" id="smile"&gt;
  &lt;/div&gt;
  &lt;script&gt;
    function click () {
      document.getElementByID("smile").src = "http://chittagongit.com//images/smile-icon/smile-icon-5.jpg"
    }
  &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>The same code at codepen:
  <a href="https://codepen.io/szczypkamaciek/project/editor/DBrPbw" rel="nofollow noreferrer">https://codepen.io/szczypkamaciek/project/editor/DBrPbw</a></p>
  
  <p>Thanks for help!!!</p>