Why does datatables not show the export button, and after adding the export code, how many lines per page of the paging function are gone?
var table = $("- sharpexample"). DataTable ({
) "paging":true,
"pagingType":"full_numbers",
"lengthMenu":[5,10,25,50],
"processing": true,
"searching": true, //
"serverSide": true,//
"bRetrieve": true,
"order": [[ 0, "desc" ]], //
"ajax":{ //
"url":"action/server.php",
"dataType":"json" //
},
"columns":[ //
{"title":"id","data":"id"},
{"title":"","data":"kh"},
{"title":"","data":"kj"},
{"title":"","data":"cpx"},//
{"title":"","data":"zhd"},
{"title":"","data":"afzhd"},
{"title":"","data":"afxjd"},
{"title":"","data":"zxrq"},
{"title":"","data":"xs"},
{"title":"","data":"crrq"},
{"title":"","data":"skr"},
{"title":"","data":"skzh"}/*,
{"title":"action","data":null,"class":"align-center"} // */
],
"language":{ //
"sProcessing":"...",
"sLengthMenu":" _MENU_ ",
"sZeroRecords":"",
"sInfo": " _START_ _END_ _TOTAL_ ",
"sInfoEmpty": " 0 0 0 ",
"sInfoFiltered": "( _MAX_ )",
"sInfoPostFix": "",
"sSearch": ":",
"sUrl": "",
"sEmptyTable": "",
"sLoadingRecords": "...",
"sInfoThousands": ",",
"oPaginate": {
"sFirst": "",
"sPrevious": "",
"sNext": "",
"sLast": ""
},
"oAria": {
"sSortAscending": ": ",
"sSortDescending": ": "
}
},
dom: "Bfrtip",
"buttons": [
{
"extend": "excel",
"text": "",
"className":"ml-15 btn btn-success",//class
"exportOptions": {
"modifier": {
"page": "current"
}
}
}
]
});
datatables
the red box in the above picture originally shows how many lines of selection are displayed on each page, but it is not displayed after adding the export code, and the export button does not show that you can"t find a reason to ask for advice from your predecessors! Thank you