CSS Portal
Run
Search
« Back to
HTML onvolumechange Event Attribute
<!DOCTYPE HTML> <html> <body> <p id="demo">Change the sound of audio.</p> <audio id="myAudio" controls onvolumechange="myFunction()"> <source src="audio.mp3" type="audio/mpeg"> Your browser does not support the audio tag. </audio> <script> function myFunction() { document.getElementById("demo").innerHTML = "You changed the sound"; } </script> <p> This example shows how to use the onvolumechange attribute for an 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