<!DOCTYPE html>该实例中,我们为 video 元素添加 "ontimeupdate" 事件。在用户开始播放视频,或者移动视频的播放位置时触发函数,并显示视频的播放位置。controls ontimeupdate="myFunction(this)"src="/statics/demosource/mov_bbb.mp4" type="video/mp4"src="/statics/demosource/mov_bbb.ogg" type="video/ogg"您的浏览器不支持 HTML5 video 标签。播放位置: id="demo"function myFunction(event) {// currentTime 属性返回音频/视频(audio/video)的播放位置document.getElementById("demo").innerHTML = event.currentTime;}