1、内敛文本
springboot34-thymeleaf内敛表达式_官网
thymeleaf官网明确表示:“数据:[[${data}]]”必须放在标签的内部,但是“数据:[[${data}]]”放在标签外部也可以生效。但是放在标签内部更加规范。因此,我们常常【th:inline="text"】放在body标签内部.如下:
springboot34-thymeleaf内敛表达式_官网_02

2、内敛脚本:可以在js中取到后台传过来的数据
springboot34-thymeleaf内敛表达式_数据_03