Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何提取在多选下拉菜单中选择的最后一个选项的值?
您可以使用:selected和:last选择器的组合:
:selected
:last
var foo = $('select option:selected:last').val();