var scrollTop = document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
<html>
<head>
<meta charset="UTF-8">
<title>监听滚动到底部滚动底部</title>
<style>
.div2{
width:100px;
height:100px;
border:1px solid red
}
*{
margin:0
.button1:active{
background:red
body{
height:375px;
width:667px;
.div1{
height:600px;
width:100%;
background:green
.div3{
background:blue
.div4{
background:yellow
</style>