其中一列:
{field:'companyName', title: '公司名称', align: 'center',minWidth:200,templet:tplCompanyName }模板方法:
var tplCompanyName = function (d) { var html = '<a style="color:#1E9FFF" href="javascript:void(0);" lay-event="showRec" >'+d.companyName+'</a>'; return html; }事件监听:
table.on('tool(myOrdersListTable)', function(obj){switch(obj.event){case 'showRec':active.showRec(obj);break;}});然后定义active.showRec(obj);
var active = { showRec:function(obj){ //...do your things }}上一篇:30个好玩的网站
下一篇:047使用指针输出数组元素