[英]jQuery templating Engine : Not able to render html output
我的模板是:
<script id="tmplRiskInformation" type="text/x-jquery-tmpl"> <div class=""> {{tmpl(collection) "#tmplLimitsDeductible" }} </div> </script> <script id="tmplLimitsDeductible" type="text/x-jquery-tmpl"> <div> ${LimitsDeductible} </div> </script>
輸出是來自數據庫的html,而不是呈現給瀏覽器。 該值是一個html表,如
LimitsDeductible = "<table><tr><td>TEST TEST</td></tr></table>"
我已經使用了以下內容,但未將結果顯示為文本而不是html。
${html LimitsDeductible}
{{html ${LimitsDeductible} }}
請找到輸出為 答案將不勝感激..謝謝
嘗試:
<script id="tmplLimitsDeductible" type="text/x-jquery-tmpl">
<div>
{{html LimitsDeductible}}
</div>
</script>
參見此處的示例: https : //github.com/BorisMoore/jquery-tmpl/blob/master/demos/step-by-step/0_tmpl-read-only/2_html-tag-source.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.