thymeleaf(th:each th:selected) 从后台动态获取下拉框数据回显及选中
生活随笔
收集整理的這篇文章主要介紹了
thymeleaf(th:each th:selected) 从后台动态获取下拉框数据回显及选中
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
thymeleaf(th:each th:selected) 從后臺動態獲取下拉框數據回顯及選中
<select οnchange="getChilds(this.value)" id="catId" name="catId"><option value=""> -- 請選擇 -- </option><option th:selected="${goods.catId eq c.id}" th:each="c:${categoryList}" th:value="${c.id}" th:text="${c.name}" value="1">蔬菜</option> </select>th:selected="${goods.catId eq c.id}":代碼部分為下拉框選中
th:each=“c:${categoryList}” th:value="${c.id}" th:text="${c.name}":代碼部分為下拉框數據回顯
總結
以上是生活随笔為你收集整理的thymeleaf(th:each th:selected) 从后台动态获取下拉框数据回显及选中的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql5.6.37 主从同步_MyS
- 下一篇: es dsl java api_求帮助将