Thymeleaf标签使用

标签

Fragment inclusion(片段包含)

  • th:insert
  • th:replace

Fragment iteration(遍历)

  • th:each

Conditional evaluation (条件判断)

  • th:if
  • th:unless
  • th:switch
  • th:case

Local variable definition(声明变量)

  • th:object
  • th:with

General attribute modification(任意属性修改,支持perpend ,append)

  • th:attr

  • th:attrprepend

  • th:attrappend

Specific attribute modification(修改指定属性默认值)

  • th:value
  • th:href
  • th:src

Text(修改标签体内容的)

  • th:text(转义特殊字符)
  • th:utext(不转义特殊字符)

Fragment specification(声明片段)

  • th:fragment

表达式语法

简单表达式

  • 变量表达式:${...}
  • 选择变量表达式:*{...}
  • 消息表达式:#{}
  • 链接网址表达式:@{ }
  • 片段表达式:~{ }

算术运算符

+,-,* ,/ ,%

布尔运算符

二进制:and,or

布尔否定:!,not

比较和相等运算符

比较运算符:&gt ; &lt ;

相等运算符:==,!=(eq,ne)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值