本文主要是介绍UniGUI 登录全屏 退出全屏(使浏览器全屏),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
// 全屏
function fullScreen() {
var element = document.documentElement;
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
}
}
// 退出全屏
function exitFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
这篇关于UniGUI 登录全屏 退出全屏(使浏览器全屏)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!