摘要: 下面是小C的js模版引擎v6,写得非常精巧。先看一下怎么使用吧。var tpl = Template(options, helper).render(); html模版,分隔符分别是<&和&>,@会被解析为"data.",就是你的数据对象,避免了使用with。 <script type="tmpl" id="table_tmpl"> <&= title() &> <table border=1> <& for(var i=0,tl = @tr 阅读全文
posted @ 2012-09-03 22:36 舟~ 阅读(309) 评论(0) 推荐(0)