get value by name array from select in jquery
var val1=[]; $('select[name="min_select[]"] option:selected').each(function() { val1.push($(this).val()); });
Here is what the above code is Doing:
1. It’s getting the value of the selected option from the select box.
2. It’s pushing the value into an array.
3. It’s looping through the array and printing the values.