I attempted to use the code below, but unfortunately it did not work as expected. Can you please provide me with a solution?
Javascript Code --->
function passValue(id, name){
console.log(id)
console.log(name)
document.getElementById("updateId").value=id;
}
Thymeleaf code -->
<input type="button" th:onclick="passValue(\''+${data.id}+'\', \''+${data.newEntryName} +'\')" value="Update" />
An error message is displayed:
SyntaxError: Unexpected Token.