开发者

Struts 2: Set ID of <td> to iterator value?

I have the following code, how do I go about setting the ID of the TD equal to that of the Year that is returned from my list (iterator)? I need this so I can then perform JavaScript functions on the table/TD (hide/show...).

<table id="earningtesttable">
       <s:iterator value="earningsTest">
            <tr>开发者_JAVA百科
               <td id=""> <!--I want to set the id also equal to the year-->
                    Year: <b><s:property value="year" /></b>
               </td>
            </tr>
       </s:iterator>
</table>

Thanks!


<td id="<s:property value="year" />">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜