我在项目中使用DataTables 1.10.11
在页面上显示一些用户数据。
我正在使用Ajax调用从服务器加载表数据。
我的数据表工作正常没有任何问题。
我的数据表:
$("#user_table").DataTable({
"destroy": true,
"order": [],
dom: "Bfrtip",
"bProcessing": false,
"bServerSide": false,
"searching": false,
"pageLength": 7,
"autoWidth": false,
"bAutoWidth": false, // Disable the auto width calculation
"sort": "position",
"stateSave": true,
"ajax": {
url: "Url/data",
type: "GET",
dataSrc: function (json) {
$('#user_profile_box div.overlay').fadeOut();
return json;
}
}
});
我不想在加载页面时从服务器加载我的数据表内容。 如果用户点击加载按钮,我希望加载我的表。 我在SO上发现了一些类似的问题,但无法找到解决方案。 这个问题有解决办法吗?
谢谢!!!