//scrollTop; var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop); // 屏幕可视区高度 var viewHeight = document.compatMod === ‘CSS1Compat‘ ? document.documentElement.clientHeight : document.body.clientHeight; // 文档高度 var documentHeight = document.compatMod === ‘CSS1Compat‘ ? document.documentElement.scrollHeight: document.body.scrollHeight;
jjavascript 高度相关,布布扣,bubuko.com
原文:http://www.cnblogs.com/feng524822/p/3880716.html