1.定义一个datagrid
<table class="easyui-datagrid"
data-options="rownumbers:true,
fitColumns:true,
fit:true ">
<thead>
<tr>
<th field="column1" align="center" width="65">列1</th>
<th field="column2" align="center" width="65">列2</th>
<th field="column3" align="center" width="65">列3</th>
<th field="_operate" align="center",width=80,formatter="formatOper">操作</th>
</tr>
</thead>
</table>
注意看最后一个<th>,它就是操作列!与之前的<th>不同的是 它/他/她 多了一个formatter属性!这个属性的值就是一个自定义函数,返回格式化的列就可以了