Change values of select box of “show 10 entries” of jquery datatable

后端 未结 9 1417
攒了一身酷
攒了一身酷 2021-01-30 12:24

By default, jquery datatable shows 10 by default and has

options : 10,25,50,100

How can I change these options?

9条回答
  •  故里飘歌
    2021-01-30 13:02

     $('#tblSub1View').dataTable({
                        "bJQueryUI": true,
                        "sPaginationType": "full_numbers",
                        "bDestroy": true,
                        "aoColumnDefs": [{
                            'bSortable': false,
                            'aTargets': [0, 1]
                        }],
                        "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
                        "iDisplayLength": 10,
                    });
    

提交回复
热议问题