[#assign i = 0]
[#list dateList as item]
[#assign i = i + 1]
<li>
<input type="radio" name="aa" id="time${i}" />
<label for="time${i}">${item}</label>
</li>
[/#list]
这样可以实现自增i了,而freemarker不允许 i++ 或者是 i += 1 语法不支持的
2024-01-09 11:22:04
[#assign i = 0]
[#list dateList as item]
[#assign i = i + 1]
<li>
<input type="radio" name="aa" id="time${i}" />
<label for="time${i}">${item}</label>
</li>
[/#list]
这样可以实现自增i了,而freemarker不允许 i++ 或者是 i += 1 语法不支持的