Thymeleaf usage

Keyword Application Case 
th: id Alternatively ID <INPUT th: id = " 'XXX' collect.id + $ {}" /> 
TH: Replace text text <p th: text = "$ {collect.description}"> Description </ P> 
TH: UTEXT supports text replacement html <P TH: UTEXT = "$ {} htmlContent"> conten </ P> 
TH: replace Object Object <div th: object = "$ {session.user}" > 
TH: assign attribute value <TH INPUT: value = "$ {the user.name}" /> 
TH: with the variable assignment operator <div th: with = "isEven = $ {prodStat.count}% 2 == 0"> </ div> 
TH: style set styles TH: style = " 'Run the display:' + @ {(? $ {sitrue} 'none': 'inline-Block')} + ''" 
th: onclick click event th: onclick = " 'getCollect ()'"
th: each property assignment TH TR: each = "User, userstat: Users $ {}"> 
TH: IF conditions determining <a th:if="${userId == collect.userId}">
th: unless and th: if the opposite determination th:href="@{/login}" th:unless=${session.user != null}> the Login <a </a> 
TH: the href link address <a th: = the href "@ {/} Login" TH: The unless = $ {! = null} session.user> </a> the Login /> 
TH: Switch multiplexer with th: case using <div th: switch = "$ { } user.role "> 
TH: TH Case: a branch of the switch <P TH: Case =" 'ADMIN' "> iS AN the User Administrator </ P> 
TH: label layout of the fragment, a code is defined fragment, cited elsewhere convenient <div TH: the fragment = "Alert"> 
TH: the include layout tab, to replace the contents of the file incoming <head th: include = "layout :: htmlhead" th: with = "title = 'xx'"> </ head> /> 
TH: replace layout tab, to replace the entire file label incorporated <div th: replace = "fragments / header :: title"> </ div>
th: selected selected selected Kuangxuan th: selected = "($ { xxx.id} == $ {configObj.dd})"
th: src address of the lead-based image <IMG class = "IMG-responsive" Alt = "Logo the App" th: src = "@ {/ IMG / logo.png}" /> 
TH: inline script can use the variables defined js <script = type "text / JavaScript" TH: inline = "JavaScript"> 
TH: address form submission action <form action = "subscribe.html" TH: action = "@ {/} Subscribe"> 
TH: remove a property delete <TR TH: the Remove = "All"> 
                    1.All: delete a label and all the children. 
                    2.body: do not contain marked for deletion, but remove all of its children. 
                    3.tag: contains marked for deletion, but does not remove its children. 
                    4.all-but-first: remove all children containing the label, except the first one. 
                    5.none: do nothing. This value is useful for dynamic evaluation. 
th: attr Settings tab properties, such as a plurality of attributes may be separated by commas th: attr = "src = @ { / image / aa.jpg}, title = # {logo}"

  

Guess you like

Origin www.cnblogs.com/tangqi9602/p/11353387.html