JavaScript代码:
$('document').ready(function() {
$('#payment_detailsview').dataTable({
"oLanguage": {
"oPaginate": {
"sPrevious": "",
"sNext": ""
}
},
"iDisplayLength": 25,
"pagingType": "full_numbers",
"bLengthChange": false,
"order": [[ 2, 'desc' ]],
"aLengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
],
在第三个colunmn中,我有姓,但它不支持"order": [[ 2, 'desc' ]]
。我该怎么办?
答案 0 :(得分:0)
对我来说很好看。我唯一能看到的就是将2改为1:
"order": [[ 1, 'desc' ]],
因为索引从0开始,你的第二列将是1.使用desc或asc