th:each=”aname : ${namelist}”
th:if=”${name} == ‘SERVICED’”
頁面使用Map集合
<div th:each="osl : ${orderStatusList}" th:if="${osl.key} == 'BOOKED'" class="Title booked" >
<div class="Point"></div>
預約 <span th:text="${osl.value}" style="position: absolute; bottom: -45px; left: 12px;"></span>
</div>
th:href=”
–內聯JS js起止加入如下代碼,否則引號嵌套或者”<”“>”等不能用
/*<![CDATA[*/
……
/*]]>*/
–js附加代碼:
/*[+
var msg = 'This is a working application';
+]*/
–js移除代碼:
/*[- */
var msg = 'This is a non-working template';
/* -]*/
select
<select class="form-control" name="filter1" >
<option value="">請選擇</option>
<option th:each="item : ${tofilter}" th:selected="${item==accessory.filter1}" th:value="${item}" th:text="${item}">全部</option>
</select>
tofilter是List集合。
持續更新中。。。。。。