title: Change image when clicking button
body: <p>This seems like it should work but doesn't. I'm not sure where the problem is - either I'm doing it wrong, or it's possible I have a syntax error. I just doesn't do anything. I'm trying to get the current picture to change when the button is clicked. I'm a beginner at Javascript, so please be gentle ;) Thank you!</p>
  
  <pre><code>&lt;html&gt;
  &lt;script&gt;
  function pictureChange()
  {
  document.getElementById(theImage).src="http://31.media.tumblr.com/fca646cd8fe87906e605ad7e8d039903/tumblr_mmoz4fWT6U1soh1p8o1_500.png");
  }
  &lt;/script&gt;
  &lt;body&gt;
  &lt;img id="theImage" src="http://31.media.tumblr.com/18b5f8f0a00ad01e50f7ae2f513be52d/tumblr_msqcl4iwM01soh1p8o1_500.png"&gt;
  &lt;p&gt;&lt;input type="button" id="theButton" value="click me!" onclick="pictureChange()"&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>