如题
另外 这个帖子 :http://bbs.csdn.net/topics/320112494 11楼的 window.scrollMaxY 在ie里能用吗?
为什么我这边是undefined??
var top = $(window).scrollTop() - 16;
if (top <= 0) {
top = 0;
}
alert(top / ($("body").height() - document.documentElement.clientHeight));
在最小值的判断上可能会有误差(-16:去掉向上向下按钮的高度),但是总体来说应该是这个方向了.
肯定不行啊。帖子不是说了,只能在firefox, opera 等浏览器,这里的等指的是标准浏览器
ie用第一个
alert(document.body.scrollHeight-document.body.clientHeight+"\n"+window.scrollMaxY)