onabortEvent

事件对象参考手册Event Object

Example

Execute JavaScript when the video stops loading:

<video onabort="myFunction()">



Definition and Usage

The onabort event triggers when the video/audio stops loading.

This event triggers when multimedia data stops loading, not when an error occurs.

Tip:Events that affect multimedia loading include:


Browser Support

The numbers in the table indicate the first browser version that supports this event.

Event
onabort Yes 9.0 Yes Yes Yes

Note:Internet Explorer 11 on Windows 7 does not support the onabort event.


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 support theaddEventListener()method.


Technical Details
Supports bubbling: No
Can it be canceled: No
Event type: Event
Supported HTML tags: <audio>, <video>


事件对象参考手册Event Object Other Extensions