代码编辑器:
x
1
<p>演示了如何使用 HTML DOM 向 audio 元素添加 "onseeking" 事件</p>
2
<p>移动音频到新的播放位置</p>
3
<audio controls onseeking="myFunction()">
4
<source src="/static/i/html/horse.ogg" type="audio/ogg">
5
<source src="/static/i/html/horse.mp3" type="audio/mpeg">
6
您的浏览器不支持 audio 元素。
7
</audio>
8
<script>
9
function myFunction() {
10
alert("寻址操作完成!");
11
}
12
</script>
13