th:if th:else

  <select id="maxBand" name="maxBand" lay-verify="required" class="form-control ">
                                        <option>请选择类型</option>  
                                        <option th:if="${dict.value}==${class1.maxBand}"

selected="true" th:each="dict : ${dictList}"

th:value="${dict.value}" th:text="${dict.name }">
                                           
                                        </option> 
                                         <option th:else th:each="dict : ${dictList}" th:value="${dict.value}" th:text="${dict.name }">
                                           
                                        </option> 
                                       </select> 

猜你喜欢

转载自blog.csdn.net/weixin_41722928/article/details/81202531
th
7th
9th
8th