注册 登录
编程论坛 JavaScript论坛

新手,烦请各路大神诊断下病因

sainte 发布于 2019-08-17 15:17, 4489 次点击
<script type="text/javascript">
            var myVideo=document.getElementById("video1").paused;
            
            function playPause()
            {
                if (myVideo.paused=ture)
                  myVideo.play();
                else
                  matchMedia.pause();
            }
            //屏幕变大
            function makeBig()
            {
            myVideo.width=560;
            }
            //屏幕中
            function makeNormal()
            {
            myVideo.width=420;
            }
            //屏幕小
            function makeSmal()
            {
            myVideo.width=320;
            }
        </script>


<div>
<video id=" video1" width="500"  controls="controls">
    <source src="sucai/0863306da82ffbb740f6e1ff475c77b6.mp4" type="audio/mp4"  >
</video>
<button onclick="playPause()"> 播放/暂停 </button>
<button onclick="makeBig()"> 变大 </button>
<button onclick="makeNormal()"> 中等 </button>
<button onclick="makeSmal()"> 变小 </button>
</div>
3 回复
#2
sainte2019-08-19 09:34

#3
sainte2019-08-19 09:34
自己给自己顶下
#4
sainte2019-08-20 10:59
已经找到啦,感谢评贴
1