Skip to content

Commit 8a38328

Browse files
committed
coding
1 parent 4fe6e3e commit 8a38328

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

YanZhiwei.JavaScript.Utilities/jquery/datatables/1.10.2/dataTables_example6.aspx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,17 @@
9393
"bSortable": false,
9494
"width": "25%",
9595
"mRender": function (data, type, row) {
96-
var context =
97-
{
98-
func: [
99-
{ "name": " 编辑 ", "fn": "edit(\'" + row.name + "\',\'" + row.ip + "\',\'" + row.group + "\')", "type": "primary" },
100-
{ "name": "删除", "fn": "del(\'" + row.name + "\',\'" + row.ip + "\',\'" + row.group + "\')", "type": "danger" }
101-
]
102-
};
103-
var html = template(context);//匹配内容
96+
//var context =
97+
// {
98+
// func: [
99+
// { "name": " 编辑 ", "fn": "edit(\'" + row.name + "\',\'" + row.ip + "\',\'" + row.group + "\')", "type": "primary" },
100+
// { "name": "删除", "fn": "del(\'" + row.name + "\',\'" + row.ip + "\',\'" + row.group + "\')", "type": "danger" }
101+
// ]
102+
// };
103+
//var html = template(context);//匹配内容
104+
//return html;
105+
var html = "<button type='button' class='btn btn-primary btn-sm' onclick=edit('" + row.name + "','" + row.ip + "','" + row.group + "')> 编辑 </button>\n" +
106+
"<button type='button' class='btn btn-danger btn-sm' onclick='del('" + row.name + "','" + row.ip + "','" + row.group + "')>删除</button>";
104107
return html;
105108
}
106109
}

0 commit comments

Comments
 (0)