A script that prints out the form structure for you, so you can keep track of which element has which number etc.
As example I take the same form as on the example form and script page.
This is the form:
Element | Name | Type | Value |
---|
This is the script. Copy-paste it below your form in the same page.
<TABLE BORDER=1><TR><TH>Element</TH><TH>Name</TH><TH>Type</TH><TH>Value</TH> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- for (var i=0;i<document.forms[0].length;i++) { current = document.forms[0].elements[i]; document.write('<TR><TD>' + i); document.write('<TD>' + current.name); document.write('<TD>' + current.type); document.write('<TD>' + current.value + '</TR>'); } // --> </SCRIPT> </TABLE>
Note document.forms[0].length: it is the number of elements in the form.