當HTML中的尋找屬性設定為false時,表示尋找已結束,請執行腳本

王林
發布: 2023-08-19 19:17:11
轉載
600 人瀏覽過

當HTML中的尋找屬性設定為false時,表示尋找已結束,請執行腳本

onseeked屬性在使用者跳過或移動到音訊或視訊的新位置時執行腳本。

範例

您可以嘗試執行以下程式碼來實作onseeked屬性 −

<!DOCTYPE html>
<html>
   <body>
      <h2 id = "test">Play</h2>
      <video id = "myid" width = "320" height = "176" controls onseeked = "myFunction()">
         <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 myFunction() {
         document.getElementById("test").innerHTML = "Current position: " +
         document.getElementById("myid").currentTime;
         }
      </script>
   </body>
</html>
登入後複製

以上是當HTML中的尋找屬性設定為false時,表示尋找已結束,請執行腳本的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:tutorialspoint.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!