您的位置:首页 > 产品设计 > UI/UE

easyui datagrid 加载php的数组

2014-05-15 18:58 218 查看
<script type="text/javascript">

$('#tt').datagrid({
url:null,
border:false,
fit:true,
fitColumns:true,
pagination:true,
pageSize:20,
pageNumber:1,
rownumbers:true,
singleSelect:false,
});

var data = <?php echo json_encode($data);?>;
$('#tt').datagrid('loadData',data);

</script>

<table id="tt">
<thead>
<tr>
<th data-options="field:'Time',width:20">时间</th>
<th data-options="field:'status',width:10">操作</th>
<th data-options="field:'contents',width:60">内容</th>
</tr>
</thead>
</table>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  easyui datagrid php json