title: Select or get all values from Select drop down array using jQuery or JavaScript
body: <p>I have the following HTML code:</p>
  <pre><code>&lt;Select name=test[]&gt;
    &lt;option value=&quot;&quot;&gt;--Please Select--&lt;/option&gt;
    &lt;option value=&quot;a&quot;&gt;Test Value1&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;Select name=test[]&gt;
    &lt;option value=&quot;&quot;&gt;--Please Select--&lt;/option&gt;
    &lt;option value=&quot;a&quot;&gt;Test Value2&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;Select name=test[]&gt;
    &lt;option value=&quot;&quot;&gt;--Please Select--&lt;/option&gt;
    &lt;option value=&quot;a&quot;&gt;Test Value3&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>Now before submitting the form I want to do the following</p>
  <ol>
  <li>Check if any of the above is selected.</li>
  <li>If selected retrieve its value.</li>
  </ol>
  <p>I believe I need to loop around but I am unable to find the initial syntax with which I can first grab all the values.</p>
  <p>I know how to check if any value is selected when 'id' is given for a select element. But in this case I have the 'name' attribute which is an array.</p>
  <p>I tried looking at different places but I haven't really come across a good solution. Probably I missed something.</p>
  <p>Please let me know if any further information is required.</p>