using thymeleaf之四操作符
来源:互联网 发布:ods直播软件 编辑:程序博客网 时间:2024/05/29 09:35
4.1算术操作符
+, -, *, /, %
e.g.
<div><ol><li>+:1+1=<span th:text="1+1">1+1</span>.</li><li>-: 2-1=<span th:text="2-1">2-1</span>.</li><li>*:2*3=<span th:text="2*3">2*3</span>.</li><li>/: 9/4=<span th:text="9/4">9/4</span>.</li><li>%:9%4=<span th:text="9%4">9%4</span>.</li></ol></div>
4.2布尔运算
e.g.
<div><ol><li th:inline="text">and:<span th:if="${!#lists.isEmpty(list)} and ${#lists.isEmpty(list)}" th:text="${!#lists.isEmpty(list)} and ${#lists.isEmpty(list)}">and</span>[[${!#lists.isEmpty(list)} and ${#lists.isEmpty(list)}]]</li><li>or:<span th:if="${!#lists.isEmpty(list)} or ${#lists.isEmpty(list)}" th:text="${!#lists.isEmpty(list)} or ${#lists.isEmpty(list)}">or</span></li><li>!(not):<span th:if="${!#lists.isEmpty(list)}" th:text="${!#lists.isEmpty(list)}">not</span></li></ol></div>
4.3不等和相等运算符
e.g.
<div><ol><li>比较表达式:<ol><li>>(gt):<span th:text="1+1" th:if="${#lists.size(list)} > 1">大于></span>else</li><li>小于lt:<span th:if="${#lists.size(list)} lt 1">小于</span>else</li><li>>=(ge):<span th:if="${#lists.size(list)} >= 1">大于等于>=</span>else</li><li>小于等于(le):<span th:if="${#lists.size(list)} le 1">小于等于</span>else</li><li>!(not):<span th:if="${!#lists.isEmpty(list)}">!(not)</span>else</li></ol></li><li>相等和不等表达式: <ol><li>==(eq):<span th:text="'Execution mode is ' + ( (${execMode} == 'dev')? 'Development' : 'Production')">等于==</span></li><li>!=(ne/neq):size:<span th:text="${#lists.size(list)}" th:if="${#lists.size(list)} != 1"></span></li></ol></li></ol></div>
0 0
- using thymeleaf之四操作符
- using thymeleaf之三文字
- using thymeleaf之十一内联
- using thymeleaf之二简单表达式
- using thymeleaf之五条件表达式
- using thymeleaf之九属性优先级
- using thymeleaf之十模板注释
- using thymeleaf之一thymeleaf认识
- using thymeleaf之六th:text/th:utext属性
- using thymeleaf之八th:with定义局部变量
- using thymeleaf 之 th:each迭代循环
- Spring Boot学习(四)之web开发渲染页面 -- Thymeleaf
- Thymeleaf的文本操作
- springboot(四):thymeleaf使用详解
- SpringBoot (四) :thymeleaf 使用详解
- springboot(四):thymeleaf使用详解
- springboot(四):thymeleaf使用详解
- springboot(四):thymeleaf使用详解
- using thymeleaf之三文字
- [Android]NetworkOnMainThreadException
- JSP脚本连接数据库的问题
- 用CFile判断文件末尾
- C#编程:多线程与UI操作
- using thymeleaf之四操作符
- joseph环
- 前端知识体系及修炼攻略
- 一个页面引入另一个页面时,contentType 应保持一致
- SGU 552 Database optimization
- antlr学习笔记
- Android底层开发之音频输入通道的软硬件分析
- 关于Verilog中的赋值问题
- 日志文件3种状态