How to convert dropdown value to array jquery <p>this way i was trying to convert dropdown value to array by jquery but routine is not working.</p> <pre><code>&lt;select name="DropDownList1" id="DropDownList1"&gt; &lt;option value="00"&gt;00&lt;/option&gt; &lt;option value="05"&gt;05&lt;/option&gt; &lt;option value="10"&gt;10&lt;/option&gt; &lt;option value="15"&gt;15&lt;/option&gt; &lt;/select&gt; function cboValueToArray(targetid) { var $target = $("select[id*=" + targetid + "]"); var results = []; $($target).each(function () { var val = $(this).val(); if (val !== '') results.push(val); }); alert(results.toString()); return results; } alert(cboValueToArray('DropDownList1').toString()); </code></pre> <p>this line <code>$($target).each()</code> is causes problem. guide me how to fix this. thanks</p>