Java
[JSP] StringBuilder를 통해서 onclick 이벤트의 인자(argument)를 전달할 때 발생하는 오류 해결 방법 / Uncaught SyntaxError: Unexpected end of input
bkuk
2023. 2. 7. 19:37
위와 같이 인자를 넣으면
아래와 같이 생성되고
이를 클릭하면 아래와 같이 에러가 발생한다.
Pass a string parameter in an onclick function
I would like to pass a parameter (i.e. a string) to an Onclick function. For the moment, I do this: '<input type="button" onClick="gotoNode(' + result.name + ')" />' with
stackoverflow.com
좌우로 백탭을 넣었다.