onabort Event
Complete Event Object Reference
Definition and Usage
The onabort event occurs when loading of an image is aborted.
Syntax
onabort="SomeJavaScriptCode"
|
Parameter |
Description |
SomeJavaScriptCode |
Required. Specifies a JavaScript to be executed when the
event occurs. |
Supported by the following HTML tags:
Supported by the following JavaScript objects:
Example 1
In this example an alert box will be displayed if the loading of the image is aborted:
<img src="image_w3default.gif"
onabort="alert('Error: Loading of the image was aborted')">
|
Example 2
In this example we will call a function if the loading of the image is
aborted:
<html>
<head>
<script type="text/javascript">
function abortImage()
{
alert('Error: Loading of the image was aborted')
}
</script>
</head>
<body>
<img src="image_w3default.gif"
onabort="abortImage()">
</body>
</html>
|
Complete Event Object Reference
|
|
|