SOURCE

console 命令行工具 X clear

                    
>
console
 

var scrollHeight = document.getElementById("a").scrollHeight; 
console.log('scrollHeight',scrollHeight);
    var scrollTop = document.getElementById("a").scrollTop;
console.log('scrollTop',scrollTop);
function a(){
  let scrollTop = document.getElementById("a").scrollTop;
  if(scrollTop>0){
  console.log('xiaoshi')
}
}

    var clientHeight = document.getElementById("a").clientHeight;
        console.log('clientHeight',clientHeight);
a();
<div id="a">
  <ul>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
    <li>啊打发手动阀撒旦</li>
  </ul>
</div>
#a{
  height:100px;
  overflow:auto;
}