I want to get the ids of checked checkboxes and store those ids in an array using jquery. Can anybody give me correct code for it.
I have tried
Thanks in advance :)
$("#merge_button").click(function(event){
event.preventDefault();
var searchIDs = $("#find-table input:checkbox:checked").map(function(){
return $(this).val();
}).toArray();
console.log(searchIDs);
});
Aucun commentaire:
Enregistrer un commentaire