zoukankan      html  css  js  c++  java
  • 单页式全屏

    <!DOCTYPE html>
    <html>
    <HEAD>
    <title>单页式全屏</title>
    <meta charset="UTF-8">

    <script language="javascript">
    //ps:这是实现屏幕最大化 方法一
    function openwin_max(url){
    var scrWidth=screen.availWidth;
    var scrHeight=screen.availHeight;
    var self=window.open(url,"PowerBOS","resizable=1");
    self.moveTo(-4,-4);
    self.resizeTo(scrWidth+9,scrHeight+9);
    }
    // ps:这是实现窗口最大化 方法二
    function openwin_full(url) {
    var scrWidth=screen.availWidth;
    var scrHeight=screen.availHeight;
    var opt='top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no,fullscreen=1';
    var self = window.open(url, "aaaa", opt);
    //var self=window.open(url,"PowerBOS","resizable=1");
    self.moveTo(0,0);
    self.resizeTo(scrWidth,scrHeight);
    }
    </script>

    <script>
    window.moveTo(0,0);
    window.resizeTo(screen.availWidth,screen.availHeight);
    window.outerWidth=screen.availWidth;
    window.outerHeight=screen.availHeight;
    //这是实现屏幕最大化! 方法三
    function fullScreen(){
    var opt='top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no';
    //window.open(document.location, 'aaa', 'fullscreen')
    window.open(document.location, "aaa", opt);
    }
    </script>

    </head>
    <body>
    <input type="BUTTON" value="全屏一" onClick="openwin_max(document.location)">
    <br />
    <input type="BUTTON" value="全屏二" onClick="openwin_max(document.location)">
    <br />
    <input type="BUTTON" value="全屏三" onClick="fullScreen()">

    <p style="font-size:16px; text-indent:2em; ">全屏1</p>
    <p style="font-size:16px; text-indent:2em; font-weight:bold; margin-top:30px;">全屏2</p>
    <p style="font-size:16px; text-indent:2em; font-weight:bold; margin-top:30px;">全屏3</p>
    </body>
    </HTML>

  • 相关阅读:
    [转]oracle数据库定时任务dbms_job的用法详解
    身份证号码的正则表达式及验证详解(JavaScript,Regex)
    js数组操作
    jq滚动到底部加载更多方法
    jq之实现轮播
    node之npm一直出错
    Jq之21点游戏
    移动端屏幕适配viewport
    meta属性
    用户体验之表单结构
  • 原文地址:https://www.cnblogs.com/zhaozhou/p/8796754.html
Copyright © 2011-2022 走看看