select中:less
<select class="form-control" id="mt" name="noticetype"> <option value="0">--請選擇--</option> <option th:each = "noticetype : ${noticetypeList}" th:selected="${noticetype.id} eq ${noticemodel.noticetype} ? true : false" th:value = "${noticetype.id}"> <span th:text="${noticetype.name}"></span> </option> </select>
class中spa
<a href="/" th:class="@{(${category} eq 'home' ? 'active-class' : '')}" class="active-class">首頁</a>
text中code
<td th:text="${bidAnnounceDO.f eq 1 ? '已發佈' : '未發佈'"}></td> //若是有多個用()括起來,如: <td th:text="${bidAnnounceDO.f eq 1 ? '已發佈' : (${bidAnnounceDO.f} eq 2 ? '考慮中' : '未發佈''')}"></td>
th:if="${bidSuppreDO.result eq 0 && bidSuppreDO.f eq 0}"
gt:great than(大於)> ge:great equal(大於等於)>= eq:equal(等於)== lt:less than(小於)< le:less equal(小於等於)<= ne:not equal(不等於)!=