Previous Example-|-Next Example-|-Return to Chapter Listing
Example 12.12:
onerror: When an Error Occurs
[This example works with Netscape Navigator 3. It will not work with Internet Explorer 3.]
The image below can't appear, because the filename in the <img> tag is incorrect. Although the browser probably won't display an error message, it still recognizes an error condition. We've used the onerror event handler to display an error message in an alert box.
In the BODY of the page we have this image tag:
Previous Example-|-Next Example-|-Return to Chapter Listing