It seems to me, that just gets the first option value from the multiple select, and not necessarily a selected one. At least if #selection points to the selection widget.
$('#selection > option:selected').each(function() ( // this should loop through all the selected elements alert($(this).val()) }); If this doesn't work, maybe post your HTML here. On Feb 11, 3:25 am, min <inuyasha...@gmail.com> wrote: > Hi, everyone. > > The following code can only get only one selected value in the > multiple selection widget: $('#selection')[0].value > > However, I want to get all the selected values in the multi-select. > > Could you plesease give me some suggestions > > thanks > min