CSS Portal
Run
Search
« Back to
HTML oncanplay Event Attribute
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Событие oncanplay (элемент audio)</title> </head> <body> <audio id="myAudio" controls oncanplay="myFunction()"> <source src="audio.mp3" type="audio/mpeg"> Your browser does not support the audio element. </video> <script> function myFunction() { alert("EXAMPLE: Audio file ready to play"); } </script> <p>Demonstration of the "oncanplay" attribute in the AUDIO element.</p> </body> </html>
If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!
☕ Buy a Coffee