收藏 SpringBoot :thymeleaf 使用详解


转载大神们笔记

--比较详细的

http://www.importnew.com/25826.html

http://www.niugebbs.com/xdmrhf/1046839.html

https://blog.csdn.net/u014042066/article/details/75614906

https://www.jianshu.com/p/a7056b023df0

--集中常用的

https://www.cnblogs.com/yws710/p/7223379.html

https://blog.csdn.net/howieli_1995/article/details/60479003

各种坑

https://my.oschina.net/u/2338224/blog/1611910

 

事件中的参数传递方式

th:onclick="'javascript:openBox(\''+${curCabNo}+'\',\''+${box.no}+'\')'"

html中引的js文件

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

iframe的使用

<iframe th:replace = "noticeBook/ej/paging::html" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>

  1. foreach用法:


 

<tr th:each="NoticeBook,start:${listNoticeBook}">
      <td><input type="checkbox" th:text="${start.index}+1"></td>
      <td th:text="${NoticeBook.docid}">默认</td>
<td th:text="${NoticeBook.docname}">默认</td>
      <td th:text="${NoticeBook.zb_date}">默认</td>
      <td th:text="${NoticeBook.zbcs}">默认</td>
   <td th:if="${NoticeBook.no_start=='1'}">已下载</td>
   <td th:unless="${NoticeBook.no_start=='1'}">未下载</td>
      <td class="last">
       <a href="javascript:void(0);" class="bidding" title="中标"></a>
       <a href="javascript:void(0);" class="cj" title="成交"></a>
      </td>
    </tr>

 

2.<a>标签直接从后台接受值

 
 <a th:href="@{${collect.CQGG_SWPT_LINK}}" value="预览">预览</a>

3.thymeleaf th:replace th:include th:insert 的区别

https://blog.csdn.net/austral/article/details/73802396
4.从后台获得值 js中接收
<script type="text/javascript" th:inline="javascript">
var zb_num = [[${zbcs}]];
 





免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM