zoukankan      html  css  js  c++  java
  • JavaScript 全屏显示窗口

    兼容IE,FireFox,Chrome等浏览器的全屏窗口显示(去除工具栏,状态栏等)
    //login.html
    function openMainPage(){
            window.opener = null;
            var screenWidth = screen.availWidth, screenHeight = screen.availHeight;
            var args = "toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=no";       
    
            //打开全屏的新窗口
            var win = window.open("main.htm","_blank",args);
            if(win){
                win.resizeTo(screenWidth,screenHeight);
                win.outerWidth = screenWidth;
                win.outerHeight = screenHeight;
                win.moveTo(0,0);
            }
            window.open('','_self');
            window.close();
        }  
    
    
    //main.html
                     //页面加载时即关闭父窗口,此页面全屏显示
            if(window.opener){
                window.opener.opener = null;
                window.opener.open('','_self');
                window.opener.close();
                window.opener = null;
            }
  • 相关阅读:
    第三周学习进度总结
    第二周学习进度总结
    动手动脑04
    动手动脑03
    动手动脑02
    课堂实践总结
    课堂实践
    原码,反码和补码学习报告
    开学第一周
    第八周
  • 原文地址:https://www.cnblogs.com/nj04w/p/1839530.html
Copyright © 2011-2022 走看看