I need to check a certain selection of checkboxes using javascript. All these checkboxes have the letter a at the beginning of the id and other checkboxes have a different letter.I also don't know how many of these checkboxes there will be since they are created dynamically
<input type="checkbox" id="a1" />
now if i click on a button a javascript fucntion is called and these checkboxes with letter a at beginning of id's should be checked, is this possible and how.
Is there something that can be used in conjunction with document.getElementById('a').checked