본문 바로가기

it-day/Thymeleaf

Thymeleaf th:onclick 변수 추가

th:onclick="함수명([[${파라미터명.value값}]])"
<button type="button" th:onclick="testFnc([[${test.aa}]])">확인</button>

괄호가 많아서 조심!! th:onclick=" testFnc ( [ [ ${ test.aa } ] ] ) "