Run
Back to
HTML onseeked Event Attribute
<!DOCTYPE HTML> <html> <body> <p id="demo">Move the lever to a new audio position:</p> <audio id="myAudio" controls onseeked="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 onseeked attribute for an AUDIO element.</p> </body> </html>