代码示例:(标识:event_onseeking_html)
<!DOCTYPE html> 
<html> 
<body> 

<p>本例演示如何将 "onseeking" 事件分配给 video 元素。</p>

<p>移动到视频中的新位置。</p>

<video controls onseeking="myFunction()">
  <source src="/static/demo/video/shanghai.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>


<script>
function myFunction() {
  alert("Seek operation began!");
}
</script>

</body> 
</html>
运行结果: