我正在寻找一种解决方案,用于将无选择标签更改为自己的文本。
我有这个代码, HTML:
<select id="mySelect" multiple="multiple">
<optgroup label="MODERN" value="MODERN">
<option value="paintings">FAMES</option>
<option value="works on paper">WORKS</option>
<option value="prints">LIFE</option>
<option value="sculptures">TIME</option>
<option value="design">DESIRE</option>
<option value="photography">FUTURE</option>
</optgroup>
</select>
<select id="mySelect2" multiple="multiple">
<optgroup label="TREND" value="TREND">
<option value="paintings">FAMES</option>
<option value="works on paper">WORKS</option>
<option value="prints">LIFE</option>
<option value="sculptures">TIME</option>
<option value="design">DESIRE</option>
<option value="photography">FUTURE</option>
</optgroup>
</select>
JS:
$(function () {
$('#mySelect').multiselect({
enableClickableOptGroups: true
});
$('#mySelect2').multiselect({
enableClickableOptGroups: true
});
});
我想将'未选中'文字改为MODERN,同时我希望select all选项包含在复选框中。
任何人都可以告诉我如何做到这一点?