thymeleaf(th:each th:selected) 从后台动态获取下拉框数据回显及选中
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                thymeleaf(th:each th:selected) 从后台动态获取下拉框数据回显及选中
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                thymeleaf(th:each th:selected) 從后臺(tái)動(dòng)態(tài)獲取下拉框數(shù)據(jù)回顯及選中
<select οnchange="getChilds(this.value)" id="catId" name="catId"><option value=""> -- 請(qǐng)選擇 -- </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}":代碼部分為下拉框數(shù)據(jù)回顯
總結(jié)
以上是生活随笔為你收集整理的thymeleaf(th:each th:selected) 从后台动态获取下拉框数据回显及选中的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
 
                            
                        - 上一篇: mysql5.6.37 主从同步_MyS
- 下一篇: mysql入门操作_对MySQL的几个入
