其他分享
首页 > 其他分享> > 浏览器全屏事件(Html5)

浏览器全屏事件(Html5)

作者:互联网

原文链接:http://www.cnblogs.com/CielWater/p/4256547.html
        <button οnclick="launchFullscreen(document.documentElement);"></button>
        function launchFullscreen(element) {
            if (element.requestFullscreen) {
                element.requestFullscreen();
            } else if (element.mozRequestFullScreen) {
                element.mozRequestFullScreen();
            } else if (element.webkitRequestFullscreen) {
                element.webkitRequestFullscreen();
            } else if (element.msRequestFullscreen) {
                element.msRequestFullscreen();
            }
        }

 

转载于:https://www.cnblogs.com/CielWater/p/4256547.html

标签:www,浏览器,CielWater,msRequestFullscreen,else,Html5,element,webkitRequestFullscreen
来源: https://blog.csdn.net/weixin_30872789/article/details/96638773