How to submit checkboxes from all pages with jQuery DataTables

后端 未结 4 1011
执念已碎
执念已碎 2020-12-06 01:11

I\'m trying to get first cell (td) for each row and getting it but only for current page. If I navigate to next page then the checkbox checked on the previous p

4条回答
  •  误落风尘
    2020-12-06 01:49

    Great code from Gyrocode.com, but if you have some other hidden values in your rows, you will have to create them too in the form.

    I use :

    var table = $('#example').DataTable({
       // ... skipped ...
    });
    
    $("#buttonValidation").click(function(){			
    			 	table.page.len(-1).draw();			  
    });

    It just displays on screen all the datatable without pagination before sending it in the form. Maybe if you want to hide the display, you can use css opacity :0 (but not display:none).

提交回复
热议问题