<!DOCTYPE html>
<html>
<body>
<button onclick="playVid()" type="button">播放视频</button>
<button onclick="pauseVid()" type="button">暂停视频</button>
<br />
<br />
<video id="video1">
<source src="/example/html5/mov_bbb.mp4" type="video/mp4">
<source src="/example/html5/mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
<script>
var myVideo=document.getElementById("video1")
function playVid()
{
myVideo.play()
}
function pauseVid()
{
myVideo.pause()
}
</script>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)