<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<button onclick="play()">播放/暂停</button>
<button onclick="makeBig()">放大</button>
<button onclick="makeSmall()">缩小</button>
<button onclick="makeNormal()">普通</button>
<video id="videoA" width="320" height="240" poster="">
<source src="img/14_7fcf1e43f99dcf88d210b0bb393c779a.mp4" type="video/mp4">
</video>
<script>
var yaoVideo = document.getElementById("videoA")
function play(){
if (yaoVideo.paused)
yaoVideo.play()
else
yaoVideo.pause()
}
function makeBig(){
yaoVideo.width = "640"
yaoVideo.height = "480"
}
function makeSmall(){
yaoVideo.width = "160"
yaoVideo.height = "120"
}
function makeNormal(){
yaoVideo.width = "320"
yaoVideo.height = "240"
}
</script>
</body>
</html>
h5 video 样式 去掉工具条 点击播放暂停
最新推荐文章于 2025-05-22 09:37:49 发布