Thymeleaf 回显checkbox、select

时间:2020-03-01 12:54:10   收藏:0   阅读:501
            <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>

  

 

原文:https://www.cnblogs.com/qinyios/p/12389071.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!