How do I get values of input element with the same name as an javascript array?
<p>I want to get values of the input element that those elements are under the same name, name="items[]"<br/>
for example:<br/></p>

<pre><code>&lt;div&gt;...&lt;input type="text" name="items[]" value="1" /&gt;&lt;/div&gt;
&lt;div&gt;...&lt;input type="text" name="items[]" value="2" /&gt;&lt;/div&gt;
&lt;div&gt;...&lt;input type="text" name="items[]" value="3" /&gt;&lt;/div&gt;
</code></pre>

<p>And I wish to get the result something like:</p>

<pre><code>[1, 2, 3] //that store in an javascript variable.
</code></pre>

<p>Do I need to do a loop to access all the elements to get its value?
Please give me a good solution either javascript or JQuery.<br/>
Thanks</p>
