Parse Thymeleaf Variable Onclick

<button th:onclick="'javascript:upload(' + ${gallery} + ')'"></button>
Shy Sheep