tymeleaf基础使用归纳

   1  th:text="{域}"  当作标签的属性 进行 取值
   2   th:each="mingcheng:${域}"  th:text="mingcheng.属性名"   当作标签的属性 进行循环取值
   3  th:if="${mingcheng=='...'}"   判断结果进行显示
   4  th:include="页面1::页面1内的fragment"   引入页面(引入页面中的fragment)
   5 th:href="'javascript:a(\'+${域}+'\')'"   传入域值 调用js函数   th:js中的属性(例如src等等)
发布了63 篇原创文章 · 获赞 44 · 访问量 6234

猜你喜欢

转载自blog.csdn.net/weixin_40695328/article/details/97014380
今日推荐