<div style="text-align:center">
<button onclick="b()"> 放大</button>
<button onclick="c()"> 缩小</button>
<button onclick="d()"> 正常</button>
<br />
<video id="video1" width="420" style="border:2px solid red"></video>
</div>
<br />
<br />
<br />
<script>
var video = document.getElementById("video1");
function b() {
video.setAttribute("width", Number(video.getAttribute("width")) + 10);
}
function c() {
video.setAttribute("width", Number(video.getAttribute("width")) - 10);
}
function d() {
video.setAttribute("width", "420");
}
</script>