thymeleaf selected動態回顯


https://blog.csdn.net/u010739551/article/details/82784669

可用為:

<select  th:value="${questionBean.review}" id="review" name="review"   class="form-control"  >
 <option th:selected="${questionBean.review}=='0'" value="0">已發布</option>
 <option th:selected="${questionBean.review}=='1'" value="1">審核中</option>
 <option th:selected="${questionBean.review}=='2'" value="2">通過審核</option>
 <option th:selected="${questionBean.review}=='3'" value="3">未通過審核</option>
</select>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM