1<script th:inline="javascript"> // Enable Thymeleaf inlining
2 var email = [[${user.email}]]; // Behaves just like in HTML
3</script>
1You can use local variables. Declare an HTML element with a th:with attribute. For example <div th:with="someVariable=${someValue}"