separate each value with comma from multiple select
<p>I have a <code>&lt;select multiple='multiple'</code> and I need to show the selected value in a div or some other part of the page.</p>

<p>I did this but the string is all smushed together. How can I separate each value with a comma?</p>

<p>I made a <a href="http://jsfiddle.net/2C523/12/" rel="nofollow"><strong>live example</strong></a> with what I have so far.</p>

<p>Or if you prefer, here is the code:</p>

<p><strong>html:</strong></p>

<pre><code>&lt;select multiple='multiple' id="selMulti"&gt;
     &lt;option value="1"&gt;Option 1&lt;/option&gt;
     &lt;option value="2"&gt;Option 2&lt;/option&gt;
     &lt;option value="3"&gt;Option 3&lt;/option&gt;
     &lt;option value="4"&gt;Option 4&lt;/option&gt;    
&lt;/select&gt;
&lt;input type="button" id="go" value="Go!" /&gt;
&lt;div style="margin-top: 10px;" id="result"&gt;&lt;/div&gt;
</code></pre>

<p><strong>js:</strong></p>

<pre><code>$("#go").click(function(){
     var selMulti = $("#selMulti option:selected").text();
     $("#result").text(selMulti);
});
</code></pre>

<p>If you select the option 1 and 2, the result will be:</p>

<p><code>Option 1Option 2</code></p>

<p>What I need is:</p>

<p><code>Option 1, Option 2</code></p>

<p>Thanks</p>
