<!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 οnclick="PlayAndPause()">播放/暂停</button> <button οnclick="videobig()">放大</button> <button οnclick="videosmall()">缩小</button> <video id="video"> <source src="text.Mp4"> 您的浏览器不支持 </video> </body> </html>
html5视频播放
最新推荐文章于 2024-05-31 22:20:16 发布