$(window).scroll(function() {
if ($(window).scrollTop() + $(window).height() == $(document).height()) {
alert("bottom!");
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="screen">
<div class="main_wrap" id="Main">
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
<div class="sub-wrap">
<div class="title">
Lorem ipsum dolor sit amet
</div>
<div class="desc">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque fringilla vel,
</div>
</div>
</div>
</div>
它的HTML在哪裏是js? – Jai