使用querySelectorAll获取所选选项

GOT*_*O 0 22 javascript html-select selectors-api

我想知道在Javascript中是否可以<select multiple>使用Selctors API 在字段中获取当前选择的选项,而不是对所有选项进行"愚蠢"迭代.

select.querySelectorAll('option[selected="selected"]')只返回在原始HTML中标记为预选的选项,这不是我正在寻找的选项.有任何想法吗?

a b*_*ver 45

document.querySelectorAll('option:checked')

即使在IE9上工作;)