在th:text中可以使用HTML标记吗?
例如:
<h2 th:text="'LOCATION INFO Device <strong>' + ${deviceKey} + ' </strong> at ' + ${deviceEventTime} ">
在th:text中可以使用HTML标记吗?
例如:
<h2 th:text="'LOCATION INFO Device <strong>' + ${deviceKey} + ' </strong> at ' + ${deviceEventTime} ">
如果您使用th:utext
而不是th:text
,那么您所拥有的内容是有效的。
<h2 th:utext="'LOCATION INFO Device <strong>' + ${deviceKey} + ' </strong> at ' + ${deviceEventTime}" />
<h2>
LOCATION INFO Device
<strong th:text="${deviceKey}" />
at
<span th:text="${deviceEventTime}">
</h2>
[(${brand})]
可以实现。<h3 th:object="${brand}" class="text-center text-black mt-5">
All Products By Brand
<span>
<b class="text-danger">[(${brand})]</b>
</span>
${object.something}
。