thymeleaf常用语法

1.改变当前元素里面的文本内容

  th:text="${hello}"  

2.遍历

  th:text="${user}"   th:each="user:${users}"  

3.行内

  <div  th:each="user:${users}">[[${user}]]</div>

4.引入css

  <link th:href="@{/static/css/login.css}">

5.引入js

  <script th:src="@{/static/jquery/jquery.js}"></script>

posted @ 2020-03-20 11:23  ToBeContinue得  阅读(258)  评论(0编辑  收藏  举报