<script type="text/template" id="mattersListInfoTpl">
//<!--
<div class="clear t_center">
<div class="fz14 blod " style="color: #454545;line-height:28px;padding: 0px 60px;margin-top: 30px;">{{mattersList.name}}</div>
<table class="model-tablb clear padding_top_10" >
<tbody>
<tr>
<td class="bg_wahte t_right" width="130">主体类别:</td>
<td width="220">{{mattersList.creditCorpusName}}</td>
<td class="bg_wahte t_right" width="130">数据部门:</td>
<td width="220">{{mattersList.govDepname}}</td>
</tr>
<tr>
<td class="bg_wahte t_right" width="130">报送方式:</td>
<td width="220">{{mattersList.fillType}}</td>
<td class="bg_wahte t_right" width="130">有效期限:</td>
<td width="220">{{mattersList.validPeriod}}</td>
</tr>
<tr>
<td class="bg_wahte t_right" width="130">更新频率:</td>
<td width="220">{{mattersList.updateFrequency}}</td>
<td class="bg_wahte t_right" width="130">公开类型:</td>
<td width="220">{{mattersList.publicType}}</td>
</tr>
<tr>
<td class="bg_wahte t_right" width="130">信息项: </td>
<td colspan="3">
{{#columnList}}
{{name}}
{{/columnList}}
</td>
</tr>
</tbody>
</table>
</div>
//-->
</script>
<script type="text/javascript">
var mattersListTpl = $("#mattersListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
var mattersListInfoTpl = $("#mattersListInfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
</script>
<!--共享目录js模板-->
注意:html需要写在js中,并将js代码注释掉
调用
var html=Mustache.render(mattersListTpl,{govDepId:govDepId, mattersList:mattersList});
$("#mattersList"+row).html(html);