當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
JS中关于clientWidth、offsetWidth、scrollWidth
生活随笔
收集整理的這篇文章主要介紹了
JS中关于clientWidth、offsetWidth、scrollWidth
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
網頁可見區域寬: document.body.clientWidth;
網頁可見區域高: document.body.clientHeight;
網頁可見區域寬: document.body.offsetWidth?? (包括邊線的寬);
網頁可見區域高: document.body.offsetHeight? (包括邊線的寬);
網頁正文全文寬: document.body.scrollWidth;
網頁正文全文高: document.body.scrollHeight;
網頁被卷去的高: document.body.scrollTop;
網頁被卷去的左: document.body.scrollLeft;
網頁正文部分上: window.screenTop;
網頁正文部分左: window.screenLeft;
屏幕分辨率的高: window.screen.height;
屏幕分辨率的寬: window.screen.width;
屏幕可用工作區高度: window.screen.availHeight;
屏幕可用工作區寬度:window.screen.availWidth;
轉載于:https://www.cnblogs.com/sensualgirl/archive/2012/11/30/2795768.html
總結
以上是生活随笔為你收集整理的JS中关于clientWidth、offsetWidth、scrollWidth的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python 调用大漠
- 下一篇: JavaScript模式读书笔记 第3章