<html> <body> <p>本例演示如何将 "onvolumechange" 事件分配给 video 元素。</p><p>请尝试更改右下角的音量。</p><video controls onvolumechange="myFunction()"> <source src="/i/photo/shanghai.mp4" type="video/mp4"> Your browser does not support HTML5 video.</video><script>function myFunction() { alert("The volume has been changed!");}</script></body> </html>