In the code shown below, how to get the values of multiselect box in function val() using jQuery or pure JavaScript?
val()
the val function called from the select will return an array if its a multiple. $('select#my_multiselect').val() will return an array of the values for the selected options - you dont need to loop through and get them yourself.
val
select
$('select#my_multiselect').val()