这是我的代码
<script type="text/html" id='usageList'>
<table cellspacing='0' cellpadding='0' border='1' >
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>LastName</th>
</tr>
</thead>
<tbody>
/* I want to include data source via ajax or some mechanism here */
<%_.each(items,function(item,key,list){ %>
<% var f = item.name; %><!-- create more variables -->
<% var l= item.lastName; %>
<tr>
<!-- use variables -->
<td><%= key %></td>
<td class="<%= f %>"><%= f %></td>
<td class="<%= l %>"><%= l %></td>
</tr>
<% }); %>
</tbody>
</table>
</script>