jsRepeater

程序名称:jsRepeater

jsRepeater 介绍

HTML Templating with minimal javascript

$('#myDiv').fillTemplate(myData)

The jsRepeater makes it easy to fill HTML Templates with javascript objects
e.g. data received from the server via AJAX

<script> var myData = {"Name" : "Google", "Type" : "Search Engine", "URL" : "www.google.com"}; $('#template1').fillTemplate(myData); </script> <body> <div id='template1'>${Name} is a ${Type} found at <a href='${URL}'>${URL}</a></div> </body>

results in:
Google is a Search Engine found at www.google.com

This is the most basic example. The power of jsRepeater lies in the fact that
it has support for some of the more complex functionality we need in the real
world e.g.

  • Binding not only to an object but child objects in one template
  • Ability to write your own javascript functions for output formatting
  • Access to numbering in a loop
  • No need for alternating templates, alternation handled in markup, not only even and odd values but also first and last
  • Infinite recursion down an object graph in one template

jsRepeater 官网

http://plugins.jquery.com/project/jsrepeater

相关编程语言

多功能下拉选择插件 SelectPage 简洁而强大的下拉分...
AutoComplete 是一个 jQuery Mobile 的插件,用于实...
Combogrid 是一个jQuery插件用于为输入框添加高级自...
Autobox2这个jQuery插件,可以用于创建类似于Facebo...
Link Scraper TextBox 是一个文本框的扩展插件,当你...
Awesomplete 超小超好用的超漂亮的 autocomplete 框...