SyntaxFix
Write A Post
Hire A Developer
Questions
Same as the earlier answer but using underscore.js.
function getSelectValues(select) { return _.map(_.filter(select.options, function(opt) { return opt.selected; }), function(opt) { return opt.value || opt.text; }); }