[英]Getting the scrollbar height of a browser
Is their any javascript code to get the scroll height. 是他们获取滚动高度的任何JavaScript代码。 I mean the scroll bar is how far from the top. 我的意思是滚动条离顶部有多远。 Please help me thanks in advance 请事先帮助我
document.documentElement.scrollTop
它将在IE和Firefox中都可以使用
use the scrollTop attribute. 使用scrollTop属性。 for example, the distance of the body's scrollbar from the top can be accessed at: 例如,可以从以下位置访问身体的滚动条与顶部的距离:
document.body.scrollTop;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.