代码编辑器:
x
1
<video id="myVideo" width="320" height="240" controls onseeking="myFunction()" onseeked="myFunction()">
2
<source src="/static/i/html/html_video_1.mp4" type="video/mp4">
3
<source src="/static/i/html/html_video_1.ogg" type="video/ogg">
4
您的浏览器不支持 video 标签。
5
</video>
6
<p>尝试在视频中寻址: <span id="mySpan"></span></p>
7
<p id="demo"></p>
8
<script>
9
function myFunction() {
10
var x = document.getElementById("myVideo");
11
document.getElementById("mySpan").innerHTML=("Seeking: " + x.seeking);
12
}
13
</script>
14