input tags with array
<p>Recently i am doing a project in which i encountered a strange problem</p>

<p>this is the program which previous programmer did
MPAN <br /></p>

<pre><code>&lt;input name="mpan[]" id="mpan[]" value="" maxlength="2" size="2" &gt;    ///this  one to read
&lt;input name="mpan[]" id="mpan[]" value="" maxlength="3" size="3"&gt;
&lt;input name="mpan[]" id="mpan[]" value="" maxlength="3" size="3"&gt;
&lt;input name="mpan[]" id="mpan[]" value="" maxlength="3" size="3"&gt;
&lt;input name="mpan[]" id="mpan[]" value="" maxlength="3" size="3"&gt;///this  one to read
</code></pre>

<p>i have to read it from a javascript what i did<br>
<br>1) document.getElementByName("mpan").value  ==> not reading script does not work 
<br>2) document.getElementByName("mpan[]").value ==> reading first one
<br>3) document.getElementByName("mpan[0]").value ==> script does not work 
<br>4) document.getElementByName("mpan[3]").value ==> script does not work 
<br>5) document.getElementByName("mpan[]")[3].value ==> not working</p>

<p>can any body tell me how to read this from a javascript program </p>
