<p class="controls">
<input type="button" value="Play" id="video-btn">
<span id="curtime">0</span>/<span id="duration">0</span>
</p>
</p>
<script>
window.onload = function(){
//get references to the elements
var player = document.getElementById("player");
var btn = document.getElementById("video-btn");
var curtime = document.getElementById("curtime");
var duration = document.getElementById("duration");
***duration.innerHTML = player.duration;***
Sila beritahu saya, mengapa anda perlu menetapkan duration.innerHTML = player.duration di sini, adakah ia masih berfungsi jika anda tidak menetapkannya?
Menjumpai penyelesaiannya