11
Jul
Learn how to get array from checked checkboxes using Jquery
Think you want to get checkboxes value which are checked using jquery. You can use following code to do that.
$('input:checkbox:checked').each(function(index){ alert($(this).val()); });
or else you want to get the array of the checked checkbox value. Then use following code.
var data = $('input:checkbox:checked').map(function(){ return this.value; }).get(); //this will give array like this. ['19', '20']