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}" 这个代表要匹配的数据。

猜你喜欢

转载自www.cnblogs.com/hfultrastrong/p/9186952.html