<logic:iterate id="var" name="doc" indexId="index">    
     <bean:write name="index"/>
     <bean:write name="var"/><br>
     </logic:iterate>序号从0开始,有办法从1开始不?解决立即给分

解决方案 »

  1.   

    <logic:iterate id="var" name="doc" indexId="index" offset="1" >
    <bean:write name="index"/>
    <bean:write name="var"/><br/>
    </logic:iterate>
    offset为1表示将从doc集合中的第二个元素开始遍历.
      

  2.   

    <logic:iterate id="var" name="doc" indexId="index">    
        <%=index + 1%>
        <bean:write name="var"/><br/>
        </logic:iterate>或者用jstl<logic:iterate id="var" name="doc" indexId="index">    
        <c:out value="${index + 1}" />
        <bean:write name="var"/><br/>
        </logic:iterate>
      

  3.   

    还有一个问题,<HTML:LINK>能传2个不确定的参数不?如果能怎么写?
      

  4.   

    <html:link page="<%="/login.do?username="+username%> ">点击</html:link>,注意URL相对路径问题
      

  5.   

    (1)<a href="xxxxx?<bean:write name="" property="">"
    (2)用javascript
    (3)用HashMap来传递多个参数.
      

  6.   

    我的2个参数都是从BEAN里取出来的
      

  7.   

    楼主 你什么人啊 --------------------------------------------------<logic:iterate id="var" name="doc" indexId="index">    
        <bean:write name="index"/>
        <bean:write name="var"/><br/>
        </logic:iterate>序号从0开始,有办法从1开始不?解决立即给分--------------------------------------------------“解决立即给分”这个是你说的吧 如果你还有问题要问 就不要说这个话 做人要厚道