[英]Add a row DataTable with json
I have a table with DataTable, JQuery, and I return a json with php, but not add data in row of table. 我有一个带有DataTable,JQuery的表,并且我用php返回了一个json,但没有在表的行中添加数据。
var table = $('#list').DataTable();
table.row.add([{"id":"1","name":"other", "action":"edit"}]);
我认为这行应该可行:
table.row.add(['Fiona White', 32, 'Edinburgh']).draw();
Try this code: 试试这个代码:
var table = $('#list').DataTable();
table.row.add([{"id":"1","name":"other", "action":"edit"}]).draw();
Try this 尝试这个
var table = $('#list').DataTable();
table.row.add({"id":"1","name":"other", "action":"edit"}).draw();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.