$(window).scroll(function () { var scrollTop = $(this).scrollTop() var windowHeight = $(this).height() var scrollHeight = $(document).height() console.log('-----------------------') if((scrollTop+windowHeight)>scrollHeight){ console.log('bottom') } console.log(`scrollTop: ${scrollTop}`) console.log(`windowHeight: ${windowHeight}`) console.log(`scrollHeight: ${scrollHeight}`)})想要移動底部觸發事件,是我哪里寫的不對嗎,一直不能正確獲取
js控制移動到底部觸發
慕妹3242003
2018-12-28 22:15:52