开发者

jquery templates: How to create a template for unknown type

开发者 https://www.devze.com 2023-02-08 04:38 出处:网络
I just started lo开发者_C百科oking at the jquery-tmpl and was wondering if it would be possible to create a template that would render an unknown type. Basically a generic template that would take a J

I just started lo开发者_C百科oking at the jquery-tmpl and was wondering if it would be possible to create a template that would render an unknown type. Basically a generic template that would take a JSON object and render all of values found on the object?


Use the each template tag

{{each(key, value) jsonObject}}
  <p>${key}: ${value}</p>
{{/each}}
0

精彩评论

暂无评论...
验证码 换一张
取 消