<!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 >
    <div>
    <input value="tt" onclick="aa()" type=button />
    </div>
    </form>
</body>
</html>

相关文章:

  • 2021-08-28
  • 2022-12-23
  • 2021-12-23
  • 2022-01-29
  • 2022-12-23
  • 2021-10-06
猜你喜欢
  • 2022-02-18
  • 2021-11-13
  • 2021-06-30
  • 2022-12-23
  • 2022-01-28
  • 2022-01-05
  • 2022-01-02
相关资源
相似解决方案