简体   繁体   中英

jQuery tmpl: How do I render Html?

Okay, I'm in a sitiuation with jQuery, the tmpl-plugin and this:

${$value.Text}

This is okay and works fine but as I just found out via 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.

Okay fine. But I can't get the {{html}} tag to work with my ${$value.Text} .

I tried things like {{html ${$value.Text}} or {html ${$value.Text}} but it just doesn't work.

正确的语法是:

{{html $value.Text}}

对我有用的是:

{{html value.Text}}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM