freemarker 遍歷map 同一行顯示多列 即 每一個tr 顯示指定數量td
阿新 • • 發佈:2018-11-13
<#if pmap??> <#assign x=0 /> <#list pmap.keySet() as strKey> <#if x%6=0><tr></#if> <#assign x=x+1 /> <td><input id="cbl_zd_0" type="checkbox" name="cbl_zd$0" /><label for="cbl_zd_0">${strKey}</label></td> <#if x%6=0></tr></#if> </#list> </#if>
這段程式碼就能達到 每一行(tr)顯示 6列資料(td)