Thymeleaf使用说明
javascript操作:
a.<script type="text/javascript" th:inline="javascript">
b.var page_url =/*[[@{/shop/page}]]*/;
c.var value =/*[[${entity.id}]]*/;
select操作:
a.遍历数据:
<select id="categorys" class="form-control">
<option th:each="c,userStat:${categorys}" th:value="${c.id}" th:text="${c.name}"></option>
</select>
b.表单回显:
<select th:field="*{entity.courseType}" name="courseType" class="form-control">
<option th:each="cts,userStat:${courseType}" th:value="${cts.id}" th:text="${cts.name}"></option>
</select>
radio操作: