开发者

jquery templates: How to create a template for unknown type

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜