CSS Portal
Run
Search
« Back to
HTML onseeking Event Attribute
<!DOCTYPE HTML> <html> <body> <p id="demo">Move the audio slider to a new position:</p> <audio id="myAudio" controls onseeking="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 have moved to position " + document.getElementById("myAudio").currentTime; } </script> <p>This example shows how to use the onseeking 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