我正在使用物化大规模选择表格http://materializecss.com/forms.html#select它需要正确的行为第一选项被禁用和选择。 百里香忽略禁用选项,尽管它被选中。相反,它会选择第一个未禁用的选项。百里香不会选择禁用选项
<div class="input-field col s6">
<select th:field="*{locale}" th:errorclass="invalid">
<option value="" selected="selected" disabled="disabled">Choose your option</option>
<option value="cs">Czech</option>
<option value="en">English</option>
</select>
<label>Locale</label>
</div>
捷克自动选择,但我想看看选择你的选项要代为选择。
尝试使用'日:selected'和'日:disabled'代替。如果你尝试,按照[这个](http://forum.thymeleaf.org/th-selected-not-working-on-multiple-select-td4025883.html)替换'name'属性的'th:field' – Enigo