HTML and CSS Reference
EXAMPLE 13.20 ( CONTINUED )
onError="alert('Image is having trouble loading!')">
The <image> tag identifies the src of a .gif image to be loaded from a subdirectory
called Image .
The onError event handler is triggered when an error occurs while loading the
image. See Figure 13.28.
Figure 13.28 The onError event handler was triggered because the image src was
wrong (left), and after the image loads (right).
Event objects are sent to an event handler with each event that occurs within a docu-
the event, what key was pressed, its coordinates (pixel positions of where it was pressed
on the screen), and so on. To learn more about what happened so that you can track
problems, get pixel coordinates, find out what button was pushed or what key was
released, and so on, the event object provides specific information about the event. This
topic can be very confusing because W3C, Mozilla/Firefox type browsers, and Microsoft
Internet Explorer differ in how events should be handled. Like economists argue over