title: onerror event using background: url()
body: <p>Is there a way to show alternate image if source image is not found? I know to accomplish this is by doing something like below:</p>
  
  <pre><code>&lt;img src="imagenotfound.gif" alt="Image not found" onError="this.src='imagefound.gif';" /&gt;
  </code></pre>
  
  <p>But how about if you are doing something like this, how can you catch if there is an error or if the image is not found?</p>
  
  <pre><code>&lt;div style="background:url('myimage.gif')"&gt;&lt;/div&gt;
  </code></pre>