Code
Execute
<!DOCTYPE html> <html> <head> <title>html tutorial - html5 - html code - html form - In 30Sec by Microsoft Award MVP - | wikitechy HTML onplaying attribute</title> <base href="../tryit/"> <body> <h1><span>html tutorial - </span> Wikitechy HTML onplaying attribute<span> - html5 - html code - html form</span></h1> <audio controls onplaying="onPlaying()"> <source src="welcome.wav" type="audio/wav"> <source src="welcome.mp3" type="audio/mp3"> </audio> <script> function onPlaying() { alert("The wikitechy audio have started playing!"); } </script> </body> </html>
Result