首页 > 代码库 > 浏览器全屏事件(Html5)

浏览器全屏事件(Html5)

        <button onclick="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();            }        }

 

浏览器全屏事件(Html5)