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>

  • 相关阅读:
    游标cursor
    SQL: EXISTS
    LeetCode Reverse Integer
    LeetCode Same Tree
    LeetCode Maximum Depth of Binary Tree
    LeetCode 3Sum Closest
    LeetCode Linked List Cycle
    LeetCode Best Time to Buy and Sell Stock II
    LeetCode Balanced Binary Tree
    LeetCode Validate Binary Search Tree
  • 原文地址:https://www.cnblogs.com/louby/p/5635805.html
Copyright © 2011-2022 走看看