HTML onabort Attribute

❮ HTML Attributes

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">



Browser Support




Status




Applies to:

The onabort attribute can be used on the following element:

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






Attribute Values

Value Description
Script Specifies JavaScript.
❮ HTML Attributes