html:hidden 的 value怎么动态赋值 <input type = "hidden" name = "aa" value = "<%= out.println(i)%>"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html:hidden name="名称" value=<%=i%> /> <html:hidden name="名称" value=<%=i%> />这种方法我试过,value得到是整型值,没办法传到form里 to:<html:hidden name="名称" value=<%=i%> />这种方法我试过,value得到是整型值,没办法传到form里它是不是在form里面?如果是的且还不能得到值的话就有点不正常,你改下<html:hidden name="名称" value=<%="\"" + i "\""%> />再试一下. 使用Struts的logic标签,遍历List时使用indeId来自动输出序号并加一例子如下:<table> <tr> <td>序号</td> <td>姓名</td> ... </tr><logic:present name="targetbean"> <logic:iterate name='helperbean' id='helperbean' type='net.echochina.HelperBean' scope='request' indexId="index"> <tr> <td><%= index.intValue() + 1 %></td> <td><bean:write name='helperbean' property='name' /></td> ..... </tr> </logic:iterate></logic:present></table> 在大家的提示下我找到这个方法<logic:iterate id="prinfo" name="optionalMethods" scope="session" indexId="index"> <tr> <td width="780" height="40" align="left"> <bean:write name="prinfo" /> </td> <td width="20"> <html:form action="/Select.do"> <html:hidden property="selectedIndex" value= "<%=index.toString()%>" /> <html:submit property="submit" value="add"/> </html:form> 两个TD 之间的边框去掉 S(1)SH整合,service注入Action是null 我认为没错,怎么还是空指针异常呢,请朋友们多多指教? 简单javascript 问题 Hibernate 配置1对多,插入等问题的demo 怎样实现一个用户同时只能登陆一次 关于jsp的中文读取问题?(高手请进!!!) 请教,如何将JSP和HTML整和使用!! 扫描扫出文件上传漏洞,求大神帮忙解决 jsp页面用c标签遍历集合里的订单对象属性 文章中过滤HTML标签的问题,欢迎讨论 关于tomcat5.5问题:无法读取WEB-INF\classes下的class文件!
这种方法我试过,value得到是整型值,没办法传到form里
这种方法我试过,value得到是整型值,没办法传到form里
它是不是在form里面?如果是的且还不能得到值的话就有点不正常,你改下
<html:hidden name="名称" value=<%="\"" + i "\""%> />再试一下.
例子如下:<table>
<tr>
<td>序号</td>
<td>姓名</td>
...
</tr>
<logic:present name="targetbean">
<logic:iterate name='helperbean' id='helperbean' type='net.echochina.HelperBean' scope='request' indexId="index">
<tr>
<td><%= index.intValue() + 1 %></td>
<td><bean:write name='helperbean' property='name' /></td>
.....
</tr>
</logic:iterate>
</logic:present>
</table>
<logic:iterate id="prinfo" name="optionalMethods" scope="session" indexId="index">
<tr>
<td width="780" height="40" align="left">
<bean:write name="prinfo" />
</td>
<td width="20">
<html:form action="/Select.do">
<html:hidden property="selectedIndex" value= "<%=index.toString()%>" />
<html:submit property="submit" value="add"/>
</html:form>