當指示 HTML 中的尋求已結束的 seeking 屬性設定為 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>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP