Using JSP code in JavaScript

后端 未结 7 1442
夕颜
夕颜 2020-12-09 05:14

I want to use JSTL\'s fmt tag in JavaScript to localize my alert messages. My JavaScript file is a standalone file and when I include fmt tag in js, the file browser gives J

7条回答
  •  旧时难觅i
    2020-12-09 05:49

    You could do the following. You store the translated message in a variable that can be resolved later on in the JSP.

    
    
    
    

提交回复
热议问题