freemarker中map集合的遍历:

<table width="300" border =1>
        <thead>
            <tr>
                <th width="100">comefrom</th>
                <th width="120">count</th>
            </tr>
        </thead>
        <tbody>
            <#if clientSourceData?exists>
                <#list clientSourceData?keys as key>
                   <tr>
                           <td>${key}</td>
                           <td>${clientSourceData.get(key)}</td>
                   </tr>
                </#list>
            </#if>
            <tr>
                   <td>合计:</td>
                   <td>${totalNum}</td>
           </tr>
        </tbody>
    </table>

猜你喜欢

转载自blog.csdn.net/jam_yin/article/details/52352339