<video id="vid1" width="320" height="240" controls loop>
<source src="Video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
您必须等到浏览器知道视频的持续时间后再寻找特定的时间。
<script>
window.onload=function(){
document.getElementById('vid1').addEventListener('loadedmetadata', function() {
this.currentTime = 200;
}, false );
};
</script>
OR
function restart1()
{ var video1 = document.getElementById("vid1");
video1.currentTime = 0;
}
<video id="vid1" width="320" height="240" onclick="restart1();" controls>
<source src="Videos.mp4#t=03,61" type="video/mp4">
Your browser does not support the video tag.
</video>
在这里我必须把你的代码 – user3232585
把它放在''
网页 –的部分有一个看看这个页面(http://gingertech.net/2009/08/19 /跳到时间偏移量在视频/)的细节。 –