var isBottom=($(document).scrollTop()>=$(document).height()-$(window).height()); 这里之所以会用>=,是因为可能会进行浮点数比较。