title: JavaScript onchange attr event for img
body: <p>No jQuery, just JavaScript. I'm using prototype.js but can't find in documentation how can I do that.</p>
  
  <p>I have the img element, and some event that change attr src, so my code is:</p>
  
  <pre><code>document.getElementById('image').addEventListener('change', myFunction(), false);
  </code></pre>
  
  <p>but this solution doesn't work with img element!</p>