How can I get the values selected in the drop-down list, using a JavaScript function? User can select multiple values from both the elements. Following are the elements
An ES6/functional style alternative to the accepted answer:
const values = Array.apply(null, e.target.options) .filter(option => option.selected) .map(option => option.value);