🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
* 获取网页的宽高: 网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeight 网页可见区域宽: document.body.offsetWidth (包括边线的宽) 网页可见区域高: document.body.offsetHeight (包括边线的高) 网页正文全文宽: document.body.scrollWidth 网页正文全文高: document.body.scrollHeight 网页被卷去的高: document.body.scrollTop 网页被卷去的左: document.body.scrollLeft * 获取元素的宽高: 元素的实际高度:document.getElementById("div").offsetHeight 元素的实际宽度:document.getElementById("div").offsetWidth 元素的实际距离左边界的距离:document.getElementById("div").offsetLeft 元素的实际距离上边界的距离:document.getElementById("div").offsetTop