运行 ❯
获取您
自身
的网站
×
更改方向
保存代码
更改主题,暗色/亮色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>HTML DOM Events</h1> <h2>The onseeked Event</h2> <p>Assign an "onseeked" event to an audio element.</p> <audio controls onseeked="myFunction()"> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <p>Try to move to a new position in the audio.</p> <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML += "Seek operation completed! "; } </script> </body> </html>