Using jquery how to get all selected checkboxes in an array
I have a checkbox with name="v", so how I can do it
1 Answer
you can use this snippet
<script>
var mySelectedArray= new Array(); // initialize array
$("input:checkbox[name=v]:checked").each(function(){
mySelectedArray.push($(this).val()); //add the checkbox value into array
});
</script>
answer Link