案例:H5监听底部事件     状态:可编辑再运行    进入竖版
 运行结果 
AخA
var scrollTop = document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
 
1
<html> 
2
 
3
    <head> 
4
 
5
    <meta charset="UTF-8">
6
 
7
        <title>监听滚动到底部滚动底部</title> 
8
 
9
        <style> 
10
.div2{
11
width:100px;
12
height:100px;
13
border:1px solid red
14
}
15
*{
16
margin:0
17
}
18
.button1:active{
19
   background:red
20
}
21
body{
22
height:375px;
23
width:667px;
24
border:1px solid red
25
}
26
.div1{
27
height:600px;
28
width:100%;
29
background:red
30
}
31
.div2{
32
height:600px;
33
width:100%;
34
background:green
35
}
36
.div3{
37
height:600px;
38
width:100%;
39
background:blue
40
}
41
.div4{
42
height:600px;
43
width:100%;
44
background:yellow
45
}
46
 
47
 
48
        </style>