In a div, I have some checkbox. I\'d like when I push a button get all the name of all check box checked. Could you tell me how to do this ?
Try this one..
var listCheck = []; console.log($("input[name='YourCheckBokName[]']")); $("input[name='YourCheckBokName[]']:checked").each(function() { console.log($(this).val()); listCheck .push($(this).val()); }); console.log(listCheck);