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>

  • 相关阅读:
    LINUX 常用命令
    连接远程Linux的几类工具
    spring-boot导出excel
    基于Vue2全家桶的移动端AppDEMO实现
    jdk+tomcat+mysql+war打包整合成exe文件,Windows下一键安装
    使用 Gogs 搭建自己的 Git 服务器
    db2 命令
    在shell脚本中调用另一个脚本的三种不同方法(fork, exec, source)
    Linux shell break、continue、exit、return的用法 及exit、return的区别
    redis 导入导出redis-load,redis-dump详解
  • 原文地址:https://www.cnblogs.com/zhaozhou/p/8796754.html
Copyright © 2011-2022 走看看