标签:win 获取 get document height .com turn lse client
//获取浏览器可视区宽度 function getWidth() { if (window.innerWidth){ return window.innerWidth; } else{ if (document.compatMode == "CSS1Compat"){ return document.documentElement.clientWidth; } else{ return document.body.clientWidth; } } }
//获取浏览器可视区高度 function getWidth() { if (window.innerHeight){ return window.innerHeight; } else{ if (document.compatMode == "CSS1Compat"){ return document.documentElement.clientHeight; } else{ return document.body.clientHeight; } } }
//获取浏览器卷曲高度 function getscrollTop() { return document.documentElement.scrollTop || document.body.scrollTop; }
未完,待续...
标签:win 获取 get document height .com turn lse client
原文地址:https://www.cnblogs.com/CooLLYP/p/10134416.html