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.hiddenname.value;
alert(text);
<s:iterator value="list">
<s:hidden name="hidden" value="%{property}" />
</s:iterator>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.