原文 JS获取当前对象大小以及屏幕分辨率等 <script type="text/javascript">function getInfo(){ var s = ""; s += " 网页可见区域宽:"+ document.body.clientWidth+"\n"; s += " 网页可见区域高:"+ document.body.clien…
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> <script type="text/javascript">function getInfo(){ var s = ""; s += " 网页可见区域宽:"+ document.body.clientWidth+"\n&q…
pc端: var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; 移动端: 网页可见区域宽:document.body.clientWidth 网页可见区域高:doc…