我正在使用物化大規模選擇表格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