Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试转义 jsp 的特殊字符。具体来说,我希望 <% 在不启动 scriptlet 的情况下出现在页面上。我怎么做?
注意:我不想 <% 在页面上,我想在 JavaScript 字符串中打印 <%。
拆分字符串并让 Javascript 在客户端将其连接起来:
tag = "<" + "%"; document.write(tag);