Thymeleaf 回显单选框,下拉选择框
单选框
<input type="radio" th:if="${var eq x}" th:checked="checked" id="man" >//如果条件成立该单选框呈现选中状态
<input type="radio" th:if="${var != x}" id="man" >//配合使用
## 下拉选择框
<option th:if="${var eq x}" th:selected="selected"><option>//如果条件成立下拉列表呈现选中状态
<option th:if="${var != x}" ><option> //配合使用