• html全屏显示


    JavaScript代码:

    function toggleFullScreen() {  
        if (!document.fullscreenElement && // alternative standard method  
            !document.mozFullScreenElement && !document.webkitFullscreenElement) {// current working methods  
            if (document.documentElement.requestFullscreen) {  
                document.documentElement.requestFullscreen();  
            } else if (document.documentElement.mozRequestFullScreen) {  
                document.documentElement.mozRequestFullScreen();  
            } else if (document.documentElement.webkitRequestFullscreen) {  
                document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);  
            }  
        } else {  
            if (document.cancelFullScreen) {  
                document.cancelFullScreen();  
            } else if (document.mozCancelFullScreen) {  
                document.mozCancelFullScreen();  
            } else if (document.webkitCancelFullScreen) {  
                document.webkitCancelFullScreen();  
            }  
        }  
    }  
    
    

    html代码

    <html ondblclick='toggleFullScreen();'>
    
    
    
  • 相关阅读:
    Netty相关知识积累
    Java内存管理
    使用nginx-upload-module搭建文件上传服务器
    mysql 5.7自动安装脚本
    CDH5集群搭建
    Linux常用命令
    编译原理要点四
    编译原理要点三
    编译原理要点二:
    编译原理要点
  • 原文地址:https://www.cnblogs.com/userzf/p/9182268.html
Copyright © 2020-2023  润新知