开发者

Assign hidden value using Struts2 tag

How assign the hidden value using Struts tag inside of iteration. My JSP code looks like this:

<s:iterator value="collegelist">
    <s:hidden name="hiddenname" value='<s:property value="collegename"/>'/>
</s:iterator>

It takes hidden field's value as a string it show on alert:

<s:property value="collegename"/>

JavaScript code:

var text = myForm.hidde开发者_JS百科nname.value;
alert(text);


<s:iterator value="list">
  <s:hidden name="hidden" value="%{property}" />
</s:iterator>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜