I want to get the names of all checked checkboxes. I tried this:
$("#movebutton").click(function() {
var selectedids = "";
alert($('.checkbos_gruppe[checked=checked]').attr("name"));
});
Does anyone have a better idea?
You need to loop through them, in this case
.map()is a great choice to get an array of names, for example:This will get you an array of the
nameattributes inselectednames, then use it however you want. Make sure to use.get()on the end so you get just an array of the names.