springmvc中复选框传值

qq_38189352 qq_38189352 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我通过

<c:forEach var="yonghuinfo1" items="${yonghuinfo1 }">
<li><a>
<tr>
<td height="44"><input type="checkbox" name="yonghuid1" value=${yonghuinfo1.id } width="150" /><!-- 姓名: -->${yonghuinfo1.name }</td>
<td ><!-- 性别: -->${yonghuinfo1.sex }</td>
<td><!-- 年龄: -->${yonghuinfo1.age }</td>
<td><!-- 手机号码: -->${yonghuinfo1.phonenum }</td>
<td><!-- 身份证: -->${yonghuinfo1.sfz }</td>
<td width="300">
<form action="${pageContext.request.contextPath}/manager/lishixx.html?yonghuinfoid=${yonghuinfo1.id}" method="post">
<input type="hidden" name="yonghuinfoid" value=${yonghuinfo.id } width="150" />
<input type="submit" value="历史记录" width="200" />
</form>
<form action="${pageContext.request.contextPath}/manager/delete_yonghuinfo.html" method="post">
<input type="hidden" name="yonghuinfoid" value=${yonghuinfo1.id } width="150" />
<input type="submit" value="删除" width="200"/>
</form>
</td>
</tr>
</a></li>
</c:forEach>
</table>
</ul>
来显示查询的结果,每个结果前都有复选框
怎么把复选框中的值通过表单传送到后台,来获取
我通过
@RequestMapping(value = "/kaihu", method = RequestMethod.POST)
public ModelAndView kaihu(@RequestParam int managerid,@RequestParam String yonghuid,HttpServletResponse response,HttpSession session)
来获取传送值
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
qq_38189352
Java EE 67,535 成员 225,843 内容