开发者

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

开发者 https://www.devze.com 2023-02-21 01:35 出处:网络
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 t

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

精彩评论

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