Can someone canonically differentiate between scrollTop and scrollHeight?

后端 未结 4 1993
花落未央
花落未央 2020-12-23 14:17

For example,

function fnCheckScroll(){   
    var iNewHeight = oDiv.scrollHeight;
    var iscrolTop = oDiv.scrollTop; 
    alert(\"The value of the scrollHei         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-23 14:39

    In Safari 6.0.1 the scrollHeight gives the height of the control and not the total height including content scrolled out of view. So it cannot be used to find the total height required to show without a scroll bar.

提交回复
热议问题