<script id="cooperatetpl" type="text/html">
<table class="table table-striped">
<tbody>
<%for(var i=0;i < rows.length;i++){%>
<%var item=rows[i];%>
<tr>
<td class="col-xs-2 col-sm-2"><%=item.name%></td>
<td class="col-xs-2 col-sm-2"><%=item.createtime_text%></td>
<td class="col-xs-10 col-sm-10"><%=item.mobile%></td>
</tr>
<%}%>
</tbody>
</table>
</script>
赋值:
$("#cooperate-list").html(Template("cooperatetpl", {rows: ret['data']['rows']}));