pagination中的afterPageText/displayMsg

<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<head>
		<link rel="stylesheet" type="text/css" href="easyui.css">
		<link rel="stylesheet" type="text/css" href="pagination.css">
		<link rel="stylesheet" type="text/css" href="linkbutton.css">
		<link rel="stylesheet" type="text/css" href="icon.css">
		<script type="text/javascript" src="jquery.min.js"></script>
		<script type="text/javascript" src="jquery.easyui.min.js"></script>
		<script type="text/javascript">
			$(function(){
				$("#pp").pagination({
					total:100,
					pageSize:20,
					pageNumber:2,
					pageList:[10,20,30,40],
					buttons:[{
						iconCls:'icon-save',
						handler:function(){
							alert("save")
						}
					},'-',{
						iconCls:'icon-add',
						handler:function(){
							alert("add")
						}
					}],
					layout:['list','sep','first','prev','next','last','sep',
							'manual','sep','links'],
					beforePageText:'第',
					afterPageText:'页 共{pages}页',
					displayMsg:'当前显示{from}-{to}条记录,共{total}条记录'
				})
			})
		</script>
	</head>
	<body> 
		<div id="pp" style="border:1px solid #ccc; width:800px;"></div>
	</body>
</html>

查找{}在JavaScript中的作用?

你可能感兴趣的:(pagination中的afterPageText/displayMsg)