thymleaf知識點總結

2021-10-04 03:57:33 字數 584 閱讀 4934

1.hymeleaf塊標籤(空標籤)th:block,標籤本身不顯示。

如table 裡面tr->td

2.thymeleaf判斷list是否為空

不為空:

th:if="$"

為空:th:if="$"

3.一篇解決 thymeleaf 下拉選的選中問題

4.用thymeleaf用標籤給頁面select下拉框賦值性別男

女5.thymeleaf-layout-dialect 有了這個布局框架,你可以專注於body體的內容,不在糾結與left  header footer 公共js css

6.thymeleaf中th:attr多屬性

使用thymeleafa時候如果要hidden某些資料,我們可以使用th:attr 將資料作為html標籤的乙個屬性存起來

例如:       

上海其中的 cityid是我們要儲存起來的資料,然後就可以在js裡面使用了。

使用方式為: 

var cityid = $("#citybtn").data("cityid");

如果是有多個屬性要hidden,只需要用逗號隔開就可以了:

上海

知識點總結

1,迴圈中的中斷 continue 跳出此次迴圈,繼續for迴圈 break 跳出當前for迴圈 return 跳出當前方法 2,字串的操作 componentseparatedbystring stringbyreplacingoccurencesofstring withstring iskin...

知識點總結

oncreate onstrat onresume onpause onstop onrestart ondestroy standard 啟動activity都會產生乙個新的activity 預設模式 singletop 啟動activity允許多個,但不允許重疊 singletask 只允許有乙...

知識點總結

function go go 呼叫 go為變數名 setinterval go,1000 1000ms clearinterval 關閉定時器 function abc a,b 2,3 5undefined 未定義 null 空 nan 非數值 string 字串 var a 123 數字型別 va...