1

i want to change table row when i pressing the tab key.Here i am using struts tag.is there any idea please post...

<s:iterator value="addresslist">
   <tr>
     <td><s:property value="id" /></td>
     <td><s:property value="name" />,<s:property value="cprNo" />,<s:property value="address" />,<s:property value="district" />,<s:property value="state" /></td>
     <td><s:property value="age" /></td>
  </tr>
</s:iterator>
4

1 回答 1

1
<s:set var="count" value="0"/>
<s:iterator value="addresslist">
   <tr>
     <td><span tabindex="<s:property value="%{#count}"/>"><s:property value="id" /></span></td>
     <td><span tabindex="<s:property value="%{#count+1}"/>"><s:property value="name" />,<s:property value="cprNo" />,<s:property value="address" />,<s:property value="district" />,<s:property value="state" /></span></td>
     <td><span tabindex="<s:property value="%{#count+2}"/>"><s:property value="age" /></span></td>
  </tr>
  <s:set var="count" value="%{#count+3}"/>
</s:iterator>

参考:

于 2013-08-07T12:15:39.140 回答