<logic:iterate id="item" name="rukud" type="..">
<tr>
<td align="center"><html:multibox property="rukud">
<bean:write name="item" property="gsid"/>
</html:mutibox></td>
<td><bean:write name="item" property="gsid"/></td>
</tr>
</logic:iterate>
如果这么写选择完后提交表单,ArrayList rukud里面的值应该就是你所选中的那一行的gsid的值,不知道是不是你想要的
<tr>
<td align="center"><html:multibox property="rukud">
<bean:write name="item" property="gsid"/>
</html:mutibox></td>
<td><bean:write name="item" property="gsid"/></td>
</tr>
</logic:iterate>
如果这么写选择完后提交表单,ArrayList rukud里面的值应该就是你所选中的那一行的gsid的值,不知道是不是你想要的
但是你这种方法的标签找不到
现在的问题还是对于多个checkbox信息怎样从页面中得到
大家来帮忙
<table>
<tr id=1></tr>
</table>
像这样,如果你想提交的话,也通过js把tr的id提交就行了。
<form action="" method="POST" name="form2">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0" >
<tr>
<td height="147" align="center" valign="top"><input type="submit" name="submit3" align="middle" value="删除" style="border:#f0f0f0 " /></td>
</tr>
</table>
</form>
------------------------------------------------
<%int i=0;%>
<logic:iterate id="item" name="rukud" type="wuliaosystem.ruku.rukuDan">
<tr>
<td align="center"><input type="checkbox" id="selected" value="<%=i%>"/></td>
<%i++;%>
<td><bean:write name="item" property="gsid"/></td>
<td><bean:write name="item" property="guige"/></td>
<td><bean:write name="item" property="type"/></td>
<td><bean:write name="item" property="rukunum"/></td>
<td><bean:write name="item" property="dw"/></td>
</tr>
</logic:iterate>
------------------------------------------------------------------
怎么得到String[] checkboxselected?
<logic:iterate id="item" name="rukud" type="..">
<tr>
<td align="center"><input type="checkbox" value="<%=i++%>"/></td>
<td><bean:write name="item" property="gsid"/></td>
</tr>
</logic:iterate>让它的值为I,这样来试试!
<tr>
<td align="center"><html:multibox name="rukuDan" property="checkboxselected"><bean:write name="item" property="gsid"/></html:multibox></td>
<%i++;%>
<td><bean:write name="item" property="gsid"/></td>
<td><bean:write name="item" property="guige"/></td>
<td><bean:write name="item" property="type"/></td>
<td><bean:write name="item" property="rukunum"/></td>
<td><bean:write name="item" property="dw"/></td>
</tr>
</logic:iterate>
这里的checkboxselected是rukuDan里面的一个String[]属性