reload datatable after ajax success

后端 未结 8 862
借酒劲吻你
借酒劲吻你 2020-12-11 05:39

I use JQuery DataTable. I send data to datatable onclick in json file at ajax succes .the first click everything is good,But the next click I get only the right data ANd wro

8条回答
  •  伪装坚强ぢ
    2020-12-11 06:25

    On a button clik you dont need to empty your table body and make initiate the datatable again with the ajax.

    you just have to call your ajax again as you have already initiate on document ready function

    just use

    $("#Table_id").ajax.reload();
    

    check the below link, you will have better idea.

    https://datatables.net/reference/api/ajax.reload()

    Let me know if this doesn't help you

提交回复
热议问题