⏹选中radio,各个radio按钮的value值不同
<table>
<tr>
<td style="padding-right: 18px">
<input id='statusJyunnbi' th:checked="*{sneStatus} eq '1'" type="radio" th:field="*{sneStatus}" value="1">
<label for="unStart" style="margin-bottom:5px;">準備中</label>
</td>
<td style="padding-right: 18px">
<input id='statusCommit' th:checked="*{sneStatus} eq '2'" type="radio" th:field="*{sneStatus}" value="2">
<label for="inProgress" style="margin-bottom:5px;">提出済</label>
</td>
<td style="padding-right: 30px">
<input id='statusEnd' th:checked="*{sneStatus} eq '3'" type="radio" th:field="*{sneStatus}" value="3">
<label for="end" style="margin-bottom:5px;">完了</label>
</td>
</tr>
</table>
⏹选中CheckBox,各个value的值相同
<table>
<tr>
<td style="padding-right: 30px">
<input id='sneTeiFuyo' th:field="*{sneTeiFuyo}" type="checkbox" value="1">
<label for="sneTeiFuyo">不要</label>
</td>
<td style="padding-right: 30px">
<input id='sneTeiToitu' th:field="*{sneTeiToitu}" type="checkbox" value="1">
<label for="sneTeiToitu">統一</label>
</td>
<td style="padding-right: 30px">
<input id='sneTeiDokuji' th:field="*{sneTeiDokuji}" type="checkbox" value="1">
<label for="sneTeiDokuji">独自</label>
</td>
<td>
<input id='sneTeiItigen' th:field="*{sneTeiItigen}" type="checkbox" value="1">
<label for="sneTeiItigen">一元</label>
</td>
</tr>
</table>
⏹thymeleaf控制checkbox的选中状态回显
<input id="test" type="checkbox" th:attr="checked=(${user.getAutoSell()} == 1 ? true: false)">
⏹thymeleaf控制下拉列表的回显
<div class="form-group">
<label for="accountType">账户类型</label>
<select class="form-control" id="accountType" name="accountType">
<option th:text="${account.getAccountType()}" selected> </option>
<option value="支付宝" >微信支付</option>
<option value="支付宝">支付宝</option>
<option value="银行卡">银行卡</option>
</select>
</div>