好的,我正在使用 jQuery、tmpl 插件和这个:
${$value.Text}
这没关系,工作正常,但正如我刚刚通过 the documentation 发现的那样:
Using {{html fieldNameOrExpression}} is equivalent to using ${fieldNameOrExpression}, except that it renders unencoded text into the HTML DOM, whereas ${} encodes values by default.
好吧好吧。但是我无法让 {{html}}
标签与我的 ${$value.Text}
一起工作。
我试过 {{html ${$value.Text}}
或 {html ${$value.Text}}
但它不起作用.
最佳答案
正确的语法是:
{{html $value.Text}}
关于jQuery tmpl : How do I render Html?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5618868/