freemarker中经常会在list的循环中使用自定义的变量,该变量随着list的循环进行加一操作,具体使用办法为:
<#assign x=0 />
<#list list as list>
<#assign x=x+1 />
${x}
</#list>
freemarker中经常会在list的循环中使用自定义的变量,该变量随着list的循环进行加一操作,具体使用办法为:
<#assign x=0 />
<#list list as list>
<#assign x=x+1 />
${x}
</#list>