1
的新價值
我的代碼如下變化,刷新數據表與下拉
$(document).ready(function() {
var filterDays = $("#countRecordsDay").val();
dTable = $('#topcustomer_order').dataTable({
bStateSave: true,
responsive: false,
bJQueryUI: false,
bProcessing: true,
bServerSide: true,
bFilter: false,
bLengthChange: false,
"bAutoWidth": false,
//multipleSelection: true,
iDisplayLength: 10,
sAjaxSource: CustomerOrderAjaxSource,
dom: "<'row'<'col-sm-2'l><'col-sm-10'f>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-12 text-right fullshowignentry'i><'col-sm-12'p>>",
fnServerParams: function (aoData) {
aoData.push({"name": "days", "value": filterDays});
},
aoColumns: [
{"sName": "Id"},
{"sName": "CustomerName"},
{"sName": "Orders"},
],
"aaSorting": [[0, 'desc']],
sPaginationType: "full_numbers"});
$('#countRecordsDay').change(function() {
dTable.api().ajax.reload();
});
它重新加載數據表,但沒有得到的參數的新值的值, 可以請任何人幫我整理出來?
這沒有意義:'_didn't沒有獲得parameter_的新值的值 - 是否要使用在下拉列表中選擇的值過濾表數據? – markpsmith
是的我想使用在下拉列表中選擇的值來過濾表格數據 –