判断当前位置是否为页面底部

5年以前  |  阅读数:434 次  |  编程语言:JavaScript 
//返回值为 true/false
function bottomVisible() {
  return (
    document.documentElement.clientHeight + window.scrollY >=
    (document.documentElement.scrollHeight ||
      document.documentElement.clientHeight)
  );
}

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8