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