更新时间:2018年08月10日14时31分 来源:传智播客 浏览次数:
| 
	 1 
	2 
	3 
	 | 
	
	<script src="jquery-1.11.2.min.js"></script><script src="jquery.pagination.js"></script> | 
	
| 
	 1 
	 | 
	
	<div class="M-box"></div> | 
	
| 
	 01 
	02 
	03 
	04 
	05 
	06 
	07 
	08 
	09 
	10 
	11 
	12 
	13 
	 | 
	
	$('.M-box').pagination({    callback: function (api) {        $('.now').text(api.getCurrent());    }}, function (api) {    $('.now').text(api.getCurrent());}); | 
	
| 
	 1 
	 | 
	
	<div class="M-box2"></div> | 
	
| 
	 01 
	02 
	03 
	04 
	05 
	06 
	07 
	08 
	09 
	10 
	11 
	12 
	13 
	 | 
	
	$('.M-box2').pagination({    coping: true,    homePage: '首页',    endPage: '末页',    prevContent: '上页',    nextContent: '下页'}); | 
	
| 
	 1 
	 | 
	
	<div class="M-box1"></div> | 
	
| 
	 1 
	2 
	3 
	4 
	5 
	6 
	7 
	8 
	9 
	 | 
	
	$('.M-box1').pagination({    totalData: 100,    showData: 5,    coping: true}); | 
	
| 
	 1 
	 | 
	
	<div class="M-box3"></div> | 
	
| 
	 01 
	02 
	03 
	04 
	05 
	06 
	07 
	08 
	09 
	10 
	11 
	12 
	13 
	14 
	15 
	16 
	17 
	18 
	19 
	20 
	21 
	22 
	23 
	 | 
	
	$('.M-box3').pagination({    pageCount: 50,    jump: true,    coping: true,    homePage: '首页',    endPage: '末页',    prevContent: '上页',    nextContent: '下页',    callback: function (api) {        console.log(api.getCurrent())    }}); | 
	
| 
	 1 
	 | 
	
	<div class="M-box4"></div> | 
	
| 
	 01 
	02 
	03 
	04 
	05 
	06 
	07 
	08 
	09 
	10 
	11 
	12 
	13 
	14 
	15 
	16 
	17 
	18 
	19 
	20 
	21 
	22 
	23 
	24 
	25 
	26 
	27 
	 | 
	
	$('.M-box5').pagination({    pageCount: 50,    jump: true,    callback: function (api) {        var data = {            page: api.getCurrent(),            name: 'mss',            say: 'oh'        };        $.getJSON('https://www.easy-mock.com/mock/58fff7a5739ac1685205ad5d/example/pagination#!method=get', data, function (json) {            console.log(json);        });    }}); |