Thymeleaf select 数据回显 选中

 

<select style='width: 148.15px' name="dlrlx" th:field="*{Ygdly.dlrlx}">
    <option th:each="dlrlxitem : ${dlrlxs}" th:text="${dlrlxitem.mc}" th:value="${dlrlxitem.bm}"></option>
</select>

 

 th:field="*{Ygdly.dlrlx}" 这个代表要匹配的数据。

posted @ 2018-06-15 13:40  GordonDicaprio  阅读(9253)  评论(0)    收藏  举报