我有两张桌子
第一张表:
var oTable1 = $('#table1').dataTable({
"sAjaxDataProp": "firstDataSource",
...
"aoColumns": [
{ "mData": "name" },
{ "mData": "value" },
]
第二张表:
var oTable2 = $('#table2').dataTable({
"sAjaxDataProp": "secondDataSource",
...
"aoColumns": [
{ "mData": "newName" },
{ "mData": "newValue" },
{
"mRender": function (data, type, full) {
return '<a id="addbtn" class="btn btn-info btn-sm" href=#/' + full[0] + '>' + 'Add' + '</a>';
}
}
]
我需要从第二个表向第一个表添加新行。是否有可能这样做?如何实施?
答案 0 :(得分:0)
For implement you can try use this link http://jsfiddle.net/n57ra688/ or http://jsfiddle.net/NpT26/14/