Thymeleaf 回顯checkbox、select


            <div class="form-group">
                <label class="col-sm-3 control-label">添加標簽:</label>
                <div class="layui-input-block">
                    <tr th:each="d : ${bts}">
                        <input type="checkbox" th:value="${d.id}" name="tagbId" th:title="${d.name}" th:attr="checked=${d.checked }" />
                        #<label th:text="${d.name}"></label>
                    </tr>
                </div>

            </div>

  

            <div class="form-group">
                <label class="col-sm-3 control-label">添加話題:</label>
                <div class="col-sm-8 radio" >
                    <select name="topicId" th:value="${topid}"id="topic" class="form-control">
                        <option th:selected="${topid==dict.id}" th:each="dict : ${topics}" th:value="${dict.id}" th:text="${dict.content }">
                    </select>
                </div>
            </div>

  

 


免責聲明!

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



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