jQuery-easyui.js超好的分页
<!--StartFragment --> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuery EasyUI</title>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css">
<script type="text/javascript" src="../jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../jquery.easyui.min.js"></script>
<script>
$(function(){
$('#pp').pagination({
total:114,
buttons:[{
iconCls:'icon-add',
handler:function(){
alert('add');
}
},{
iconCls:'icon-cut',
handler:function(){
alert('cut');
}
},{
iconCls:'icon-save',
handler:function(){
alert('save');
}
}],
onSelectPage:function(pageNumber, pageSize){
$(this).pagination('loading');
alert('pageNumber:'+pageNumber+',pageSize:'+pageSize);
$(this).pagination('loaded');
}
});
});
</script>
</head>
<body>
<h1>Pagination</h1>
<div style="margin:10px 0;">
<a href="#" οnclick="javascript:$('#pp').pagination({loading:false})">loaded</a>
<a href="#" οnclick="javascript:$('#pp').pagination({loading:true})">loading</a>
</div>
<div id="pp" style="background:#efefef;border:1px solid #ccc;"></div>
</body>
</html>