<body>
<div id="list"></div> <script type="text/javascript">
$(function () {
$('#list').datagrid({
url: '/xj/GetIndex',
columns: [[
{ field: 'xh', title: '学号', width: 100 },
{ field: 'xm', title: '姓名', width: 100 },
{
field: 'csrq', title: '出生日期', width: 100,
formatter: function (value) {
var date = new Date(value);
var y = date.getFullYear();
var m = date.getMonth() + 1;
var d = date.getDate();
return y + '-' + m + '-' + d;
}
}
]]
});
});
</script>
</body>