-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
50 lines (42 loc) · 1.07 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/public/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
#aaa{
width: 100px;
height: 1000px;
background-color: red;
}
</style>
</head>
<body>
<button>输出每个列表项的值</button>
<ul>
<li>Coffee</li>
<li>Milk</li>
<li>Soda</li>
</ul>
<div id="aaa" >
</div>
<div>
<input type="checkbox" name="ni" />你
<input type="checkbox" name="ni" />我
<input type="checkbox" name="ni" />他
<input type="checkbox" name="ni" />呵呵
</div>
<input type="button" value="敲吧敲吧" />
<script type="text/javascript">
$(window).scroll(function() {
if ($(document).scrollTop()<=0){
alert("滚动条已经到达顶部为0");
}
if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
console.log("滚动条已经到达底部为");
}
});
</script>
</body>
</html>