【thymeleaf】th:with
作者:互联网
前言
略
th:with
th:with
用于定义局部变量。其作用范围在其所在标签或者子标签中有效。
th:with
定义的局部变量在其所在标签中使用
Hello , <span th:width="name='jack'" th:text="${name}" class="na"></span> :
th:with
定义的局部变量在子标签中使用
<ul th:with="liSize=5">
<li th:each="index : ${#numbers.sequence(1, liSize)}" >
[(${index})]. some thing
</li>
</ul>
标签:index,定义,标签,所在,局部变量,thymeleaf,th 来源: https://blog.csdn.net/sayyy/article/details/120107828