标签:
中文帮助请点这里:中文属性详解
以下为未完结版
<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <link rel=‘stylesheet‘ type=‘text/css‘ href=‘__PUBLIC__/Css/common.css‘> <link rel="stylesheet" type="text/css" href="http://www.cheap-louisvuittonoutlet.net/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.cheap-louisvuittonoutlet.net/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="http://www.cheap-louisvuittonoutlet.net/easyui/themes/color.css"> <link rel="stylesheet" type="text/css" href="http://www.cheap-louisvuittonoutlet.net/easyui/demo/demo.css"> <script type="text/javascript" src="http://www.cheap-louisvuittonoutlet.net/easyui/jquery.min.js"></script> <script type="text/javascript" src="http://www.cheap-louisvuittonoutlet.net/easyui/jquery.easyui.min.js"></script> <script type="text/javascript" src="js/jquery"></script> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <table id="dg" ></table> <div id="tb"> <a href="#" class="easyui-linkbutton" data-options="iconCls:‘icon-add‘,plain:true">新增</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:‘icon-edit‘,plain:true">编辑</a> </div> <script type="text/javascript"> $(document).ready(function(){ $(‘#dg‘).datagrid({ columns:[[ {field:‘categories_id‘,title:‘分类ID:‘,width:100}, {field:‘parent_id‘,title:‘父类id:‘,width:100}, {field:‘date_added‘,title:‘添加时间:‘,width:100,align:‘right‘}, {field:‘categories_status‘,title:‘状态‘,width:100,align:‘right‘} ]],//columns 列的数组属性 fitColumns:‘true‘,//当此属性为true时所有列会均匀的充满datagrid的宽度,True 就会自动扩大或缩小列的尺寸以适应表格的宽度并且防止水平滚动 autoRowHeight:‘true‘,//当true时,根据内容调整表格行的高度 toolbar:‘#tb‘,//工具栏,指定1个div的id striped:‘true‘,//为true就是隔行变色 nowrap:‘true‘,//True 就会把数据显示在一行里 method:‘post‘,//请求远程数据的请求方法 idField:‘categories_id‘,//标识字段,主键的字段 url:‘/index.php/__URL__/getJson‘,//从远程站点获得数据的 URL pagination:true, width:700, title:‘测试‘ }); }) </script> </body> </html>
jquery easyui DataGrid 数据表格 属性
标签:
原文地址:http://www.cnblogs.com/chenchuanwen/p/4586647.html