bra*_*zen 6 template-engine thymeleaf
我将Thymeleaf与js微模板程序结合使用,从而在属性值中产生特殊字符.在运行Thymeleaf时
<a style="display:<%= x ? 'block' : 'none' %>;">
Run Code Online (Sandbox Code Playgroud)
它创建
<a style="display:<%= x ? 'block' : 'none' %>;">
Run Code Online (Sandbox Code Playgroud)
虽然我希望得到与处理器完全相同的功能.如何在HTML属性值中使用特殊字符?非常感谢!
尝试玩
th:utext="#{unescaped text}">
Run Code Online (Sandbox Code Playgroud)
请参阅Thymeleaf doc Unescaped Text
| 归档时间: |
|
| 查看次数: |
7888 次 |
| 最近记录: |