我们在键盘上留下的余温
也将随时代传递到更远的将来
Fork me on GitHub

关于thymeleaf中th:if的使用

运用于判断表达式中时,关系判断使用 gt / ge / eq / lt / le / ne (即:使用缩写)

 

1 gt:     great than(大于)>
2 ge:    great equal(大于等于)>=
3 eq:    equal(等于)==
4 lt:    less than(小于)<
5 le:    less equal(小于等于)<=
6 ne:    not equal(不等于)!= 

 

以th:if为例

1 <td th:if="${prj.DOC_DESC} ne null">
2 <!--此处ne若是换成not equal或者!=,则会js判断错误,无法正常执行-->
3   <a th:href="#">下载</a>
4   <a th:href="#">预览</a>
5 </td>

 

 ————————————————
版权声明:本文为博客园博主「Neumann97」的原创文章,转载请附上原文出处链接及本声明。
原文链接:https:////www.cnblogs.com/dream-by-dream/p/11728693.html

posted @ 2019-10-23 20:32  Neumann97  阅读(44666)  评论(0编辑  收藏  举报