// 数据
var data = {
list: ["js", "html", "css"],
showList: true,
person: {
name: ‘json‘,
age: 18
}
dataTime: ‘2014-12-1 14:14:14‘,
number: 12345678
}
// 调用模板
var tpl = fasTpl( document.getElementById( ‘test‘ ).innerHTML ),
html = tpl.render( data );
// 快捷写法
// var html = fasTpl( document.getElementById( ‘test‘ ).innerHTML, data );