thymeleaf th:if表达式
程序员文章站
2024-01-05 11:32:34
...
thymeleaf 判断表达式
gt great than > 大于
ge great equal >= 大于等于
lt less than < 小于
le less equal <= 小于等于
eq equal == 等于
ne not equal != 不等于
用法示例
<span th:if="${index} gt '7'"></span>
<span th:if="${index} ge '7'"></span>
<span th:if="${index} lt '7'"></span>
<span th:if="${index} le '7'"></span>
<span th:if="${index} eq '7'"></span>
<span th:if="${index} ne '7'"></span>