Example:
HTML
<!DOCTYPE html>
<html>
<head>
<title>
HTML onsuspend Attribute
</title>
</head>
<body>
<center>
<h1 style="color:green">Horje</h1>
<h2>HTML onsuspend Attribute</h2>
<audio controls id-"audioID">
<source src="https://file-examples.com/wp-content/storage/2017/11/file_example_MP3_700KB.mp3" type="audio/mpeg">
</audio>
</center>
<script>
document.getElementById(
"audioID").addEventListener("suspend", GFGfun);
function GFGfun() {
alert(
"Media loading suspended");
}
</script>
</body>
</html>
How to use HTML onsuspend Attribute | HTML Attribute |
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |