zoukankan      html  css  js  c++  java
  • 全屏展示

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
        </head>
        <body>
            <button onclick="fullScreen()">�ִ������ȫ��</button>
    
            <button onclick="exitScreen()">�ִ�������˳�</button>
    
            <button onclick="iefull()">�Ͱ汾ieȫ��</button>
        </body>
        <script src="js/jquery-2.1.1.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            //ȫ��
            function fullScreen(){
                var el = document.documentElement;
                var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;      
                    if(typeof rfs != "undefined" && rfs) {
                        rfs.call(el);
                    };
                  return;
            }
            //�˳�ȫ��
            function exitScreen(){
                if (document.exitFullscreen) {  
                    document.exitFullscreen();  
                }  
                else if (document.mozCancelFullScreen) {  
                    document.mozCancelFullScreen();  
                }  
                else if (document.webkitCancelFullScreen) {  
                    document.webkitCancelFullScreen();  
                }  
                else if (document.msExitFullscreen) {  
                    document.msExitFullscreen();  
                } 
                if(typeof cfs != "undefined" && cfs) {
                    cfs.call(el);
                }
            }
            //ie�Ͱ汾��ȫ�����˳�ȫ�����������
            function iefull(){
                var el = document.documentElement;
                var rfs =  el.msRequestFullScreen;
                if(typeof window.ActiveXObject != "undefined") {
                    //��ķ��� ģ��f11����ʹ�����ȫ��
                    var wscript = new ActiveXObject("WScript.Shell");
                    if(wscript != null) {
                        wscript.SendKeys("{F11}");
                    }
                }
            }
            //ע��ie����ActiveX�ؼ�����Ҫ��ie�������ȫ��������� ��δ���Ϊ�ɰ�ȫִ�нű���ActiveX�ؼ���ʼ����ִ�нű��� ����Ϊ����
        </script>
    </html>
    View Code
  • 相关阅读:
    备忘
    基于ZooKeeper实现分布式锁
    git 使用ssh密钥
    git 的安装及使用
    sqlalchemy 使用pymysql连接mysql 1366错误
    SQL语句及5.7.2 mysql 用户管理
    C 实现快速排序
    C 实现冒泡排序
    C 实现选择排序
    sqlalchemy orm 操作 MySQL
  • 原文地址:https://www.cnblogs.com/justSmile2/p/10978873.html
Copyright © 2011-2022 走看看