Posted by & filed under 技术.

<!DOCTYPE HTML>
<html>
    <head>
    <script>
    window.onload=function  () {
     var playbtn=document.getElementById("play");
     var video=document.getElementById("video");
     playbtn.onclick=function  () {
       video.play();
     }
    }
    </script>
    </head>
    <body>
      <video controls=controls  loop =loop poster="1.jpg" id="video">
        <source src="iceage4.mp4"></source>
        <source src="iceage4.webm"></source>   <!--第一个格式不正确就播放第二个-->
      </video>
      <input type="button" value="播放" id="play"/>
      <audio src="fcml.mp3" controls=controls >
      </audio>
    </body>
</html>
作者:sjtu_chenchen 发表于2015/5/11 22:25:50 原文链接