鍍金池/ 問(wèn)答/數(shù)據(jù)庫(kù)/ DataTables如何從后臺(tái)獲取數(shù)據(jù)?

DataTables如何從后臺(tái)獲取數(shù)據(jù)?

DataTables如何從后臺(tái)獲取數(shù)據(jù)?
他的js文件應(yīng)該怎么寫?

回答
編輯回答
生性
$('#dataTable').DataTable({
    columns: [
    ],
    ajax: {
      url: url,
      type: 'POST',
      dataType: 'json',
      contentType: 'application/json',
      data(d) {
        // 分頁(yè)信息
      },
      dataFilter(result) {
        // 
      },
    },
  });
2018年8月20日 05:49