当寻找属性设置为true时,表示HTML中的寻找活动正在进行时,执行一个脚本

原创
ithorizon 5个月前 (10-19) 阅读数 36 #HTML

使用 onseeking 属性来指示 HTML 视频中的搜索处于活动状态。

示例

当 Seeking 属性设置为 true 时,您可以尝试运行以下代码来执行脚本,表明在 HTML 中搜索处于活动状态 -
<!DOCTYPE html>
<html>
   <body>
      <video controls onseeking = "display()">
         <source src = "/html5/foo.ogg" type = "video/ogg" />
         <source src = "/html5/foo.mp4" type = "video/mp4" />
         Your browser does not support the video element.
      </video>
      <script>
         function display() {
            alert("Seeking starts!");
         }
      </script>
   </body>
</html>

以上就是当寻找属性设置为true时,表示HTML中的寻找活动正在进行时,执行一个脚本的详细内容,更多请关注IT视界其它相关文章!



热门