我thymeleaf在前端使用,我知道variable概念thymeleaf
<span th:with="var=${someValue}" th:text="${var}"></span>
Run Code Online (Sandbox Code Playgroud)
如果我使用th:text变量中的值将被打印,我可以在同一个元素中使用该变量,有没有办法var在其他元素中使用
<span th:with="var=${someValue}"></span>
<span th:text="${var}"></span>
Run Code Online (Sandbox Code Playgroud)
我需要global scope在百里香中提供这个变量吗?
| 归档时间: |
|
| 查看次数: |
8065 次 |
| 最近记录: |