这个数组格式为[编号,金额,编号,金额,编号,金额..............]
现在我想把这个数组的每个元素都迭代出来 迭成表格的格式 数组长度不确定
就类似这样 编号 金额
1 3
2 4
4444 555
<s:iterator value="ss" status="st" id="array">
<s:iterator value="ss[#st.index]" >
<s:if test="#st.index%2==0">
<s:property value="#array[#st.index]"/>
<s:property value="#array[#st.index+1]"/>
</s:if>
我是这样写的 但每次都只能迭代到下标为0和1 的数据 求回答
<s:if test="#st.index%2==0">
<s:property value="#array[#st.index-1]"/>
<s:property value="#array[#st.index]"/>
</s:if>
这样写呢
/s:if
/s:iterator
<s:iterator value="ss" status="st" id="array">
<s:if test="#st.index%2==0">
<s:property value="#array[#st.index]"/>
<s:property value="#array[#st.index+1]"/>
</s:if>
</s:iterator>