您的位置:首页 > Web前端 > HTML5

html5视频播放

2015-07-19 22:37 573 查看
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>视频播放</title>
<script type="text/javascript">
function PlayAndPause(){
var video=document.getElementById("video");
if(video.paused){
video.play();
}else{
video.pause();
}
}
function videobig(){
var video=document.getElementById("video");
video.width=800;
video.height=800;
}
function videosmall(){
var video=document.getElementById("video");
video.width=300;
video.height=300;
}

</script>
</head>
<body>
<button onclick="PlayAndPause()">播放/暂停</button>
<button onclick="videobig()">放大</button>
<button onclick="videosmall()">缩小</button>
<video id="video">
<source src="text.Mp4">
您的浏览器不支持
</video>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: