# Μικρή συμβουλή Javascript...OnError για εικόνες...

<datetime class="hidden">2003-10-11T00:00</datetime>

<!-- category -- mostlylucidcouk, Imported -->
## 

[Μικρή συμβουλή Javascript...OnError για εικόνες...](https://web.archive.org/web/http://www.mostlylucid.co.uk/archive/2003/10/11/583.aspx)

Posted on [1:03 ΑΜ](https://web.archive.org/web/http://www.mostlylucid.co.uk/archive/2003/10/11/583.aspx)

This is an odd little tip...not sure where I found this out, but I use it a fair bit...if you have an image which you're not sure will be available, add this to the img tag: OnError="this.src='/images/shim.gif';this.width='1';this.height='1'" (where images/shim.gif is an image which will ALWAYS be available - if not you'll get an odd error...).

Εν πάση περιπτώσει, το , μπορεί να αποτρέψει την άσχημη σπάστη εικόνα του ...