-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (44 loc) · 1.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>大白分页组件编写</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/mina.css">
<script src="js/index.js"></script>
</head>
<body>
<div class="content">
<div id="box">
</div>
</div>
<script>
window.onload = function () {
var El = document.getElementById('box');
var dp = new paging(El);
/*
*
* 可以传三个参数
*
* index 总页数 默认是一页
*
* thisdata 当前所在页数 默认是第一页
*
* fn:回调函数,反回值当前页码
*
*
* 三个参数可以填可以不填,不填就是默认
*
*
* */
dp.init({
index:20,
thisdata:7,
fn:function (e){
console.log(e)
}
});
}
</script>
</body>
</html>