Ví dụ sử dụng javascript để điều chỉnh video Code: <!DOCTYPE html> <html> <body> <div style="text-align:center"> <button onclick="playPause()">Chạy/Tạm dừng</button> <button onclick="makeBig()">Cỡ lớn</button> <button onclick="makeSmall()">Cỡ nhỏ</button> <button onclick="makeNormal()">Cỡ vừa</button> <br><br> <video id="video1" width="420"> <source src="https://webvn.com/wp-content/uploads/2014/12/mov_bbb.mp4" type="video/mp4"> <source src="https://webvn.com/wp-content/uploads/2014/12/mov_bbb.ogg" type="video/ogg"> Trình duyệt của bạn không hỗ trợ thẻ video trong HTML5. </video> </div> <script> var myVideo = document.getElementById("video1"); function playPause() { if (myVideo.paused) myVideo.play(); else myVideo.pause(); } function makeBig() { myVideo.width = 560; } function makeSmall() { myVideo.width = 320; } function makeNormal() { myVideo.width = 420; } </script> <p>Video được cung cấp từ <a href="http://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p> </body> </html> Kết quả: