Get deep elements by name in Javascript within another element
I have a HTML document with multiple div tags like
<div id="id1">
<table>
<tr>
<th>Name</th>
<th>Serial</th>
</tr>
<tr>
<td><input id="Param1" name="Group1" type="text" value
="0"/></td>
<td><input id="Param2" name="Group1" type="text" value
="0"/></td>
</tr>
<tr>
<td><input id="Param3" name="Group2" type="text" value
="0"/></td>
<td><input id="Param4" name="Group2" type="text" value
="0"/></td>
</tr>
</table>
</div>
<div id="id2">
...
...
</div>
How can I select the inputs that have div id as "id1" and make an array of
input ids that have name "Group1" using either Javascript OR jQuery?
No comments:
Post a Comment