form.element
by using this property we can get all the element of a form as an array
<script>
function fun1()
{
arr =frm1.elements
for(i=0;i<arr.length;i++)
{
alert(arr[i}.type);
}
}
</script>
<form id= "frm1">
< input type ="text" id= "txt1">
< input type ="text" id= "txt1">
<input type ="button" valur="click" id ="but1">
< input type ="button" value ="get element" onclick = "fun1()">
</form>
by using this property we can get all the element of a form as an array
<script>
function fun1()
{
arr =frm1.elements
for(i=0;i<arr.length;i++)
{
alert(arr[i}.type);
}
}
</script>
<form id= "frm1">
< input type ="text" id= "txt1">
< input type ="text" id= "txt1">
<input type ="button" valur="click" id ="but1">
< input type ="button" value ="get element" onclick = "fun1()">
</form>