![]() |
Definition and UsageThe error event occurs when an error occurred during the loading of a media file. Applies toThe onerror attribute is part of the Event Attributes, and can be used on the following elements:
Browser SupportThe |
Example:
HTML
<audio onerror="myFunction()">
Example:
HTML
<video onerror="myFunction()">
html onerror attribute |
How to Run "myFunction" if an error occurs during loading Video | HTML Attribute |
How to Run "myFunction" if an error occures during loading audio | HTML Attribute |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 111 |
Reffered: https://www.w3schools.com/tags/att_onerror.asp