HTML onended Attribute
Example
//Accessing the element
var vid = document.getElementById("myVideo");
//Creating a function
vid.onended = function() {
alert("The video has been ended");
};
Meaning
The ended event run when the current playlist is ended.
Standard Syntax
<element onended="script">
Applies to:
The onended attribute can be used on the following element:
Advertisement
Attribute Values
| Value | Description |
|---|---|
| script | Specifies the script to be run on onended. |