2013-10-08 3 views
2
내가 백엔드 하나를 '선택하세요'교체 및 속성과 요소 <i>을 유지하는 방법을

<button type="button" class="dropdown" th:text="#{Lang.Select}">Please select <i class="icon icon-chevron-down"></i></button>thymeleaf html 요소 교체

?

답변

4

추가 스팬을 삽입해야하지만 생성시 제거됩니다. <button type="button" class="dropdown"><span th:text="#{Lang.Select}" th:remove="tag">Please select<span> <i class="icon icon-chevron-down"></i></button>

또 다른 옵션은 th : text에 넣는 것입니다. 그러나 첫 번째 것을 선호합니다. <button type="button" class="dropdown" th:text="${#{Lang.Select} + '<i class="icon icon-chevron-down"></i>'}">Please select <i class="icon icon-chevron-down"></i></button>

+0

처음으로 작업 한 사람. 감사합니다. +1 –