如何在freemark页面中获取到当前list循环的counter

直接上代码

<#list lists as x>
<#assign j=x?counter>
${j}
//依次输出1,2,3....根据循环次数而定
</#list>

你也看到了,就是x?counter

相关文章:

  • 2022-12-23
  • 2021-07-21
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案