Relation between SPAN and FORM elements

wxdqz

New Member
I have got a html document with form and span element as mentioned below. I wanted to know is there a parent and child relation between the "form" ,"span" and "form elements" in JavaScript. For example using form id can I able to access all the span ids inside the FORM and similarly using form id and span id can I able to access the elements inside that specific FORM and SPAN using javascript.

<form id="firstform">

<span id="first" name="something" >
<input name="fname" type="text">
<input name="lname" type="text">
</span>

<span id="second" name="something" >
<input name="fname1" type="text">
<input name="lname1" type="text">
</span>

<span id="third" name="something" >
<input name="fname2" type="text">
<input name="lname2" type="text">
</span>

</form>
 
Back
Top