thymeleaf th:if表達式語法


1.比較運算符

gt:great than(大於)>
ge:great equal(大於等於)>=
eq:equal(等於)==
lt:less than(小於)<
le:less equal(小於等於)<=
ne:not equal(不等於)!=

2.網頁應用

<td class="td-status" th:if="${product.status} eq 1">
<span class="label label-success radius">已上架</span>
</td>

<a th:if="${product.status} ne 2 " class="ml-5" href="javascript:;" title="發布秒殺">
<i class="Hui-iconfont">&#xe603;</i>
</a>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM