-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (48 loc) · 1.15 KB
/
index.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 lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo</title>
<link rel="stylesheet" href="./css/pagination.css">
<script src="./js/pagination.js"></script>
</head>
<body>
<div id="pages">
</div>
<div id="pages_1" style="margin-top:100px">
</div>
</body>
</html>
<script>
new Pagination({
element: '#pages',
type: 1,
pageIndex: 1,
pageSize: 10,
pageCount: 5,
total: 100,
jumper: true,
singlePageHide: false,
prevText: '上一页',
nextText: '下一页',
disabled: true,
currentChange: function(index) {
// console.log(index);
}
});
new Pagination({
element: '#pages_1',
type: 2,
pageIndex: 1,
pageSize: 5,
pageCount: 9,
total: 100,
jumper: true,
singlePageHide: false,
disabled: true,
currentChange: function(index) {
console.log(index);
}
});
</script>