我有两张桌子

第一表:

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>';
            }
        }
]


我需要从第二张表向第一张表添加新行。是否有可能这样做?如何实施?

最佳答案

For implement you can try use this link http://jsfiddle.net/n57ra688/ or http://jsfiddle.net/NpT26/14/

09-19 23:53