我正在使用 davidstutz/bootstrap-multiselect 下拉列表,我想在获得下拉列表时获得未选择的值:
<div class="form-group">
<label for="Course" class="col-sm-4 control-label">Dashbord *</label>
<div class="col-sm-4" id="multicourse">
<select id="Course" name="options[]" multiple="multiple" style="width:100%">
<option value="1" >Sales</option>
<option value="2" >Students</option>
<option value="3" >Quetion</option>
<option value="4" >Test</option>
<option value="5" >Test Series</option>
<option value="6" >Student</option>
<option value="7" >Validity</option>
<option value="8" >Disk Space</option>
<option value="9" >Student Graph</option>
<option value="10" >Date</option>
</select>
</div>
</div>
在脚本中:
$('#Course').multiselect({
includeSelectAllOption: true,
nonSelectedText:"Select Dashbord",
nSelectedText:"Dashbord",
enableFiltering: true,
maxHeight:200,
buttonWidth: '95%',
});
$("#Course").multiselect('selectAll', false);
$("#Course").multiselect('updateButtonText');