I have a set of input checkboxes with the same name
and I would like to determine which checkboxes have been checked using javascript, how can I achieve that?
I know only how to get all the checkboxes as follows:
var checkboxes = document.getElementsByName('mycheckboxes');
A simple for loop which tests the
checkedproperty and appends the checked ones to a separate array. From there, you can process the array ofcheckboxesCheckedfurther if needed.