我有一个jquery UI multiselect下拉菜单。Here is the link我想获取未检查的值。我有类似这样的东西来获取所有选中的选项:
var optionValues = $('option:selected', this).map(function() {
return this.value;
}).get();
但我想要未检查的值。有什么想法吗?
发布于 2015-03-19 12:33:00
试试这个:-
var notSelectedValues = $("select#id").find('option').not(':selected');
var array = notSelectedValues.map(function () {
return this.value;
}).get();
alert(array.join(', '))
Fiddle Demo
https://stackoverflow.com/questions/29137234
复制相似问题