zoukankan      html  css  js  c++  java
  • 控制浏览器高度 宽度 只能支持ie

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>请调整浏览器窗口</title>
        <meta http-equiv="content-type" content="text/html; charset=gb2312" />
    </head>
    <body>
        <h2 align="center">请调整浏览器窗口大小</h2><hr />
        <form action="#" method="get" name="form1" id="form1">
            <!--显示浏览器窗口的实际尺寸-->
            浏览器窗口 的 实际高度: <input type="text" name="availHeight" size="4" /><br />
            浏览器窗口 的 实际宽度: <input type="text" name="availWidth" size="4" /><br />
        </form>
        <script type="text/javascript">
            document.body.clientWidth = 100;
            if (window != top) top.location.href = location.href;
            self.resizeTo(800, 600);

            function openWin() {
                var i = 0;
                i = open("", "", "width=500,height=500");
            }
            var new_width = 800; //你要固定的浏览器宽度
            var new_height = 600; //你要固定的浏览器高度
            function resizewindow() {
                window.resizeTo(new_width, new_height);
            }
            resizewindow();
            //-->
        </script>
    </body>
    </html>

  • 相关阅读:
    Part 17 Consuming ASP NET Web Service in AngularJS using $http
    Part 16 ng include directive in AngularJS
    Part 15 AngularJS ng init directive
    文本框
    mint上部署lamp环境
    18种有效有趣的读书方法(转载)
    可扩展的架构设计
    iisreset和w3wp的关系
    Ajax请求中带有IPv6地址后的百分号的问题
    IE中JavaScript 的异常处理
  • 原文地址:https://www.cnblogs.com/louby/p/5635805.html
Copyright © 2011-2022 走看看