I have a select box defined as shown below. I want to print out the name and email address of each item in the select box as comma seperated values, like
Tom Wayne,tom@xyz.com
Joe Parker,joe@xyz.com
Peter Simons,peter@xyz.com
Any way to accomplish that using JQuery?
<select multiple="multiple" name="search_results">
<option value="tom@xyz.com">Tom Wane</option>
<option value="joe@xyz.com">Joe Parker</option>
<option value="peter@xyz.com">Peter Simons</option>
</select>
Thank You
Try this:
This will alert you the options for each select individually.