Underscore.js templates使用 <%= %> 进行变量插值。不幸的是,这也在 JSP(或 GSP)中进行了解释。有没有办法在 JSP 中使用 Underscore.js 模板?
最佳答案
根据您链接到的网页:
If ERB-style delimiters aren't your cup of tea, you can change Underscore's template settings >to use different symbols to set off interpolated code.
它建议您更改
interpolate
和 evaluate
正则表达式。这意味着您可以将 <%= %> 的用法更改为与 JSP 不冲突的内容。
关于jsp - JSP 中的 Underscore.js 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5771742/