jsp EL 표현식과 javascript 문법 충돌 #3
noahyunjun
started this conversation in
3. 이슈
Replies: 1 comment
-
|
한 가지 추가 해결 방법으로는... 이 모든 일이 *.jsp 형식에 있는 <script> 태그 내에서 발생하는 문제이므로, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
var day = '월요일';
var text =
오늘은 ${day} 입니다.하지만 jsp엔진을 거치게 된다면, 여러 과정을 거치게 됩니다.
서버에서 request.setAttribute로 day에 값을 넣어주면, js 코드가 다르게 실행됩니다.
request.setAttribute("day", "토요일");
해결방법 -
오늘은 ${'${day}'} 입니다.오늘은 \${day} 입니다.Beta Was this translation helpful? Give feedback.
All reactions