Easy Tutorial
❮ Prop Tablerow Valign Jsref Tofixed ❯

Image onerror Event


Definition and Usage

The onerror event is triggered when an error occurs during the loading of a document or an image.

Syntax

Parameter Description
JavaScriptCode Required. Specifies the JavaScript to be executed when the event occurs.

Browser Support

All major browsers support the onerror event.


Example

In this example, if an error occurs while loading an image, a dialog box is displayed:

❮ Prop Tablerow Valign Jsref Tofixed ❯