为什么我获取页面高度 就是零啊 alert(sHeight)就是 0.
谷歌浏览器的兼容问题
var sHeight=document.documentElement.scrollHeight || document.body.scrollHeight;
即可。