<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>layout</title>
<script src="jquery-easyui-1.4.5/jquery.min.js" type="text/javascript"></script>
<script src="jquery-easyui-1.4.5/jquery.easyui.mobile.js" type="text/javascript"></script>
<script type="text/javascript" src="jquery-easyui-1.4.5/jquery.easyui.min.js" charset="utf-8"></script>
<link href="jquery-easyui-1.4.5/themes/gray/easyui.css" rel="stylesheet" type="text/css" />
<link href="jquery-easyui-1.4.5/themes/icon.css" rel="stylesheet" type="text/css" />
<script src="jquery-easyui-1.4.5/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#dd').layout({
fit:true,
});
function formatShow(value,row,index){
if(value==1){
return "男";
}else{
return "女";
}
}
$('#box').datagrid({
method:'get',
url:'people.json',
title:'用户列表',
iconCls : 'icon-search',
pagination:true,
columns:[[
{
field:'name',
title:'姓名',
checkbox:true
},
{
field:'sex',
title:'性别',
formatter:formatShow,
},
{
field:'birthday',
title:'出生日期',
},
{
field:'email',
title:'邮箱',
},
]],
});
var p = $('#box').datagrid('getPager');
$(p).pagination({
pageSize: 5,
pageList:[5,10,15,20],
});
});
</script>
</head>
<body>
<div id="dd" class="easyui-layout" style="width:600px;height:400px;">
<div data-options="region:'north',title:'North Title',split:true" style="height:100px;">北</div>
<div data-options="region:'south',title:'South Title',split:true" style="height:100px;">南</div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;">东</div>
<div data-options="region:'west',title:'West',split:true" style="width:100px;">西</div>
<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;">
<table id="box" ></table>
</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>layout</title>
<script src="jquery-easyui-1.4.5/jquery.min.js" type="text/javascript"></script>
<script src="jquery-easyui-1.4.5/jquery.easyui.mobile.js" type="text/javascript"></script>
<script type="text/javascript" src="jquery-easyui-1.4.5/jquery.easyui.min.js" charset="utf-8"></script>
<link href="jquery-easyui-1.4.5/themes/gray/easyui.css" rel="stylesheet" type="text/css" />
<link href="jquery-easyui-1.4.5/themes/icon.css" rel="stylesheet" type="text/css" />
<script src="jquery-easyui-1.4.5/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#dd').layout({
fit:true,
});
function formatShow(value,row,index){
if(value==1){
return "男";
}else{
return "女";
}
}
$('#box').datagrid({
method:'get',
url:'people.json',
title:'用户列表',
iconCls : 'icon-search',
pagination:true,
columns:[[
{
field:'name',
title:'姓名',
checkbox:true
},
{
field:'sex',
title:'性别',
formatter:formatShow,
},
{
field:'birthday',
title:'出生日期',
},
{
field:'email',
title:'邮箱',
},
]],
});
var p = $('#box').datagrid('getPager');
$(p).pagination({
pageSize: 5,
pageList:[5,10,15,20],
});
});
</script>
</head>
<body>
<div id="dd" class="easyui-layout" style="width:600px;height:400px;">
<div data-options="region:'north',title:'North Title',split:true" style="height:100px;">北</div>
<div data-options="region:'south',title:'South Title',split:true" style="height:100px;">南</div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;">东</div>
<div data-options="region:'west',title:'West',split:true" style="width:100px;">西</div>
<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;">
<table id="box" ></table>
</div>
</div>
</body>
</html>