Advertisement
Home Open Editor ❯

HTML onabort Attribute

Example

//Accessing the element
var vid = document.getElementById("myVideo");

//Creating a function
vid.onabort = function() {
    alert("The video load is aborted");
};

Meaning

The onabort event run when the loading of an audio/video is aborted.


Standard Syntax

HTML: <element onabort="Script">


Applies to:

The onabort attribute can be used on the following element:

Element Attribute
<audio> onabort
<embed> onabort
<img> onabort
<object> onabort
<video> onabort

Advertisement

Attribute Values

Value Description
Script Specifies JavaScript.
Home Open Editor ❯
Advertisement