獲取網(wǎng)頁,屏幕大小,邊線大小

字號:


    查看效果:獲取網(wǎng)頁,屏幕大小,邊線大小
    <html>
    <title>獲取網(wǎng)頁,屏幕大小,邊線大小</title>
    <body>
    <script type=text/javascript>
    var s=;
    s+=<br>網(wǎng)頁整體區(qū)域?qū)挘?document.body.clientwidth;
    s+=<br>網(wǎng)頁可見區(qū)域高:+document.documentelement.clientheight;//window.innerwidth -firefox;
    s+=<br>網(wǎng)頁可見區(qū)域?qū)挘?document.body.offsetwidth+(包括邊線的寬);
    s+=<br>網(wǎng)頁可見區(qū)域高:+document.body.offsetheight+(包括邊線的高);
    s+=<br>網(wǎng)頁正文全文寬:+document.body.scrollwidth;
    s+=<br>網(wǎng)頁正文全文高:+document.body.scrollheight;
    s+=<br>網(wǎng)頁被卷去的高:+document.body.scrolltop;
    s+=<br>網(wǎng)頁被卷去的左:+document.body.scrollleft;
    s+=<br>網(wǎng)頁正文部分上:+window.screentop;
    s+=<br>網(wǎng)頁正文部分左:+window.screenleft;
    s+=<br>屏幕分辨率的高:+window.screen.height;
    s+=<br>屏幕分辨率的寬:+window.screen.width;
    s+=<br>屏幕可用工作區(qū)高度:+window.screen.availheight;
    s+=<br>屏幕可用工作區(qū)寬度:+window.screen.availwidth;
    document.write(s);
    </script>
    </body>
    </html>