I want to get a list of all the switches that are contained in a div using javascript or jquery.
eg,
<div id="container">
<input type="radio" id="1">
<input type="radio" id="2">
<input type="radio" id="3">
.... //total no of radio buttons are not known
</div>
I need an array containing the identifier of all the switches contained in the div.
arr[0]="1"
arr[1]="2"
arr[2]="3"
...
..
source
share