springmvc中复选框传值
我通过
<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)
来获取传送值
<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)
来获取传送值
...全文
相关推荐
jQuery+SpringMVC中的复选框选择与传值实例
下面小编就为大家分享一篇jQuery+SpringMVC中的复选框选择与传值实例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
Java后台获取JSP页面多个复选框选中的值
后台通过array来接受前端多个复选框选中的值,里面有全代码可以直接拿去用。
springmvc前台向后台传值几种方式总结(从简单到复杂)
今天小编就为大家分享一篇springmvc前台向后台传值几种方式总结(从简单到复杂),具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
springMVC前台传数组类型,后台用list类型接收实例代码
主要介绍了springMVC前台传数组类型,后台用list类型接收实例代码,具有一定借鉴价值,需要的朋友可以参考下。
SpringMVC表单标签知识点详解
主要为大家详细介绍了SpringMVC表单标签知识点,具有一定的参考价值,感兴趣的小伙伴们可以参考一下


