zoukankan      html  css  js  c++  java
  • javascript,高度与宽度

    <!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 runat="server">
        <title>Untitled Page</title>
        <script>
        function aa()
        {
            alert("网页可见区域宽: "+document.body.clientWidth+
            "\n网页可见区域高: "+document.body.clientHeight+
            "\n网页可见区域宽: "+document.body.offsetWidth+" (包括边线的宽)"+
            "\n网页可见区域高: "+document.body.offsetHeight+" (包括边线的高)"+
            "\n网页正文全文宽: "+document.body.scrollWidth+
            "\n网页正文全文高: "+document.body.scrollHeight+
            "\n网页被卷去的高: "+document.body.scrollTop+
            "\n网页被卷去的左: "+document.body.scrollLeft+
            "\n网页正文部分上: "+window.screenTop+
            "\n网页正文部分左: "+window.screenLeft+

            "\n浏览器可见高度: "+document.documentElement.clientHeight+
            "\n屏幕分辨率的高: "+window.screen.height+
            "\n屏幕分辨率的宽: "+window.screen.width+
            "\n屏幕可用工作区高度: "+window.screen.availHeight+
            "\n屏幕可用工作区宽度: "+window.screen.availWidth);
        }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        <input value="tt" onclick="aa()" type=button />
        </div>
        </form>
    </body>
    </html>

  • 相关阅读:
    线程
    进程2
    进程
    socketserver
    黏包
    初始网络编程
    模块
    super
    mro c3算法
    日志固定格式
  • 原文地址:https://www.cnblogs.com/yaksea/p/1284154.html
Copyright © 2011-2022 走看看