标签:
当需要用列表来遍历集合的内容时,list指令时非常好用的。
语法:
<#list sequence as item> ... </#list>
说明:
示例:
<#assign seq=["winter","spring","summer","autumn"]> <#list seq as x> ${x_index+1}.${x}<#if x_has_next>,</#if> </#list>
打印结果:
1.winter,2.spring,3.summer,4.autumn
标签:
原文地址:http://www.cnblogs.com/kjitboy/p/5094147.html