jQuery - get form elements by container id
Posted
by ungarida
on Stack Overflow
See other posts from Stack Overflow
or by ungarida
Published on 2010-05-24T17:46:19Z
Indexed on
2010/05/24
17:51 UTC
Read the original article
Hit count: 207
Which is the easiest way to get all form elements which are contained by a wrapper element.
<form name="myForm">
<input name="elementA" />
<div id="wrapper">
<input name="elementB" />
<textarea name="elementC" />
</div>
</form>
In the above HTML I would elementB and elementC but not elementA. I do not want to list all form element types (select,textarea,input,option...). I would prefer to use myForm.elements.
Any ideas?
© Stack Overflow or respective owner