template-web.js
template-web.js是一款非常实用的在js里面动态拼接HTML语句的插件 示例如下: [removed][removed] [removed] var source = '' + '{{each list as value i}}' + '索引 {{i + 1}} :{{value}}' + '{{/each}}' + '< /ul>'; var render = template.compile(source); var html = render({ list: ['摄影', '电影', '民谣', '旅行', '吉他'] }); document.getElementById('content')[removed] = html; [removed] /ul>'; var render = template.compile(source); var html = render({ list: ['摄影', '电影', '民谣', '旅行', '吉他'] }); document.getElementById('content')[removed] = html; [removed]
用户评论