-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
61 lines (52 loc) · 1.29 KB
/
index.php
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
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JQuery Pagination Plugins -- DEMO</title>
</head>
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery.tinypagination.js" type="text/javascript"></script>
<?php
$page = (int)$_GET['page'];
$page = empty($page)?1:$page;
?>
<script type="text/javascript">
$(function(){
var page = <?php echo (int)$_GET['page'];?>;
page = page==0?1:page;
$(".paginations").tinypagination({
changeHandler:function change(page){
// alert(page);
},
total:80,
currentPage:page,
mode:"ajax"
});
$(".paginations2").tinypagination({
changeHandler:function change(page){
// alert(page);
},
total:80,
currentPage:page,
mode:"nomal",
pageUrl:"?page="
});
});
</script>
<body style="margin: auto;0px;">
---------------------DEMO页面-------------------<hr>
<div style="width:960px;">
<h1>Ajax</h1>
<div class="paginations">第一个</div>
<div class="paginations"></div>
<div class="paginations"></div>
<div class="paginations"></div>
<hr>
<h1>Nomal</h1>
<div class="paginations2"></div>
<div class="paginations2"></div>
<div id="result">
</div>
</div>
</body>
</html>