使用 HTML 中的 onstalled 属性在浏览器无法获取媒体日期时执行脚本。
<video> <audio>
以下是 的语法 -<video onstalled ="script"> 以下是 的语法 -<audio onstalled = "script"> 示例您可以尝试运行以下代码来实现onstalled 属性 -立即学习“前端免费学习笔记(深入)”;<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls onstalled ="display()"> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> Your browser does not support the video element. </video> <script> function display() { alert ("Sorry! Video isn't available right now!"); } </script> </body> </html> 以上就是当浏览器由于任何原因无法获取媒体数据时,在HTML中执行脚本?的详细内容,更多请关注IT视界其它相关文章!
<video onstalled ="script">
以下是 的语法 -<audio onstalled = "script"> 示例您可以尝试运行以下代码来实现onstalled 属性 -立即学习“前端免费学习笔记(深入)”;<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls onstalled ="display()"> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> Your browser does not support the video element. </video> <script> function display() { alert ("Sorry! Video isn't available right now!"); } </script> </body> </html> 以上就是当浏览器由于任何原因无法获取媒体数据时,在HTML中执行脚本?的详细内容,更多请关注IT视界其它相关文章!
<audio onstalled = "script">
您可以尝试运行以下代码来实现onstalled 属性 -
立即学习“前端免费学习笔记(深入)”;
<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls onstalled ="display()"> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> Your browser does not support the video element. </video> <script> function display() { alert ("Sorry! Video isn't available right now!"); } </script> </body> </html>
以上就是当浏览器由于任何原因无法获取媒体数据时,在HTML中执行脚本?的详细内容,更多请关注IT视界其它相关文章!
本篇文章给大家分享6个值得一学的...
隐藏html标签的方法:1、通过...
html设置编码utf8的方法:...
html设置字体的方法:1、【f...
本篇文章给大家介绍html隐藏文...
本篇文章给大家介绍html页面实...
ithorizon