get selected checkbox value with submit button in jquery code example
Example 1: get value of all checked boxes jquery
var values = $('input[name=grepperRocks]:checked')
.map(() => { return this.value }).get();
Example 2: jquery get selected checkboxes
var selected = [];
$('#checkboxes input:checked').each(function() {
selected.push($(this).attr('name'));
});