W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <p>本例演示如何将 "onloadedmetadata" 事件分配给 video 元素。</p> <video controls onloadedmetadata="myFunction()"> <source src="/i/photo/shanghai.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> <script> function myFunction() { alert("Meta data for video loaded"); } </script> </body> </html>