Run
Back to
HTML onloadeddata Event Attribute
<!DOCTYPE HTML> <html> <body> <audio id="myAudio" controls onloadeddata="myFunction()"> <source src="audio.mp3" type="audio/mpeg"> Your browser does not support the audio tag. </audio> <p>Play audio file:</p> <script> function myFunction() { alert("EXAMPLE: Data uploaded"); } </script> <p>This example shows how to use the onloadeddata attribute for an AUDIO element.</p> </body> </html>