onabortEvent

事件对象参考手册Event Object

Examples

Execute JavaScript when image loading is aborted:

<img src="image_w3default.gif.html" onabort="myFunction()">


Definition and Usage

The onabort event is triggered when the user aborts loading of the <img> or <input type="image"> element.


Browser Support

Event
onabort Not supported Yes Not supported Not supported Not supported


Syntax

In HTML:

<element onabort="myScript">

In JavaScript:

object.onabort=function(){myScript};

In JavaScript, using the addEventListener() method:

object.addEventListener("abort", myScript);

Note:Internet Explorer 8 and earlier IE versions do not supportaddEventListener()method.


Technical Details

Bubbles: Yes
Cancelable: No
Event type: If generated on the user interface, it is UIEvent, otherwise it is Event.
Supported HTML tags: All HTML elements, except: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>

事件对象参考手册Event Object

Other extensions