How to reload the datatable(jquery) data?

后端 未结 10 2516
萌比男神i
萌比男神i 2020-12-05 05:39

How to reload the selected tab? Actually I have problem with reloading part. When I add my data I\'ll successfully saved in datatable but in id field in database it shows pr

10条回答
  •  没有蜡笔的小新
    2020-12-05 05:45

    // Get the url from the Settings of the table: oSettings.sAjaxSource
    
    function refreshTable(oTable) {
        table = oTable.dataTable();
        oSettings = table.fnSettings();
    
        //Retrieve the new data with $.getJSON. You could use it ajax too
        $.getJSON(oSettings.sAjaxSource, null, function( json ) {
            table.fnClearTable(this);
    
            for (var i=0; i

提交回复
热议问题