zoukankan      html  css  js  c++  java
  • 利用js实现html页面自动全屏代码

    <html>  

    <script language="JavaScript">  

    top.window.moveTo(0,0);  

    //判断是否为IE浏览器  

    if (document.all)   

    {   

    top.window.resizeTo(screen.availWidth,screen.availHeight);  

    }  

    //判断是否为Netscape浏览器(document.layers是Netscape 4.x专有的属性,由于  

    //document.layers在Netscape6.0以后已经取消,此方法只适用于6.0之前的浏览器)  

    else if (document.layers||document.getElementById)   

    {

    if(top.window.outerHeight<screen.availHeight||  

    top.window.outerWidth<screen.availWidth)  

    {  

     top.window.outerHeight = screen.availHeight;  

        top.window.outerWidth = screen.availWidth;  

    }  

    }  

    </script>  

    <head>  

    </head>  

    <body>  

    </body>  

    </html> 

  • 相关阅读:
    3.24
    3.23
    构建之法读书笔记2
    寒假学习day23
    寒假学习day22
    寒假学习day21
    寒假学习day20
    寒假学习day19
    寒假学习每周总结4
    寒假学习day18
  • 原文地址:https://www.cnblogs.com/martin-roger/p/5479299.html
Copyright © 2011-2022 走看看