三個高屬性
1.屏幕可視區高度
document.documentElement.clientHeight;
2.頁面的高度
document.documentElement.scrollHeight;
3.滾動條當前高度
document.documentElement.scrollTop;
document.body.scrollTop;(chrome)今天測試時發現谷歌瀏覽器不再使用該方法,而是使用上述上面的方法,而edge瀏覽器反而需要使用該方法。
三個高屬性
1.屏幕可視區高度
document.documentElement.clientHeight;
2.頁面的高度
document.documentElement.scrollHeight;
3.滾動條當前高度
document.documentElement.scrollTop;
document.body.scrollTop;(chrome)今天測試時發現谷歌瀏覽器不再使用該方法,而是使用上述上面的方法,而edge瀏覽器反而需要使用該方法。