Get value form multiple check boxes and alert the values using jQuery, which check boxes are selected in the page. You cant try this code:
$("#submit_data").on('click',function(){ var mycheckbox= []; $.each($('input[name="nationality"]:checked'),function(){ mycheckbox.push($(this).val()); }); alert(mycheckbox.join(", ")); });
Question and answer is powered by AnsPress.io