[英]Add a row DataTable with json
我有一個帶有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();
試試這個代碼:
var table = $('#list').DataTable();
table.row.add([{"id":"1","name":"other", "action":"edit"}]).draw();
嘗試這個
var table = $('#list').DataTable();
table.row.add({"id":"1","name":"other", "action":"edit"}).draw();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.