EL c:if test="${ }" 两个数据比较大小 注意事项

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_25623257/article/details/83990336

数值比较大小时,有时会出现 无法比较的现象,所以 数值*1.0 就可以正常比较

<c:if test="${money*1.0 < 100*1.0 }">
</c:if>

关系符:

相等( equal ) :eq

不相等( not equal ): ne / neq

大于( greater than ): gt

小于( less than ): lt

大于等于( great than or equal ) : ge/ gte 

小于等于(  less than or equal ): le/lte

猜你喜欢

转载自blog.csdn.net/qq_25623257/article/details/83990336