当前位置: 代码迷 >> Java Web开发 >> [求助]批量问题?
  详细解决方案

[求助]批量问题?

热度:206   发布时间:2007-10-28 22:26:06.0
[求助]批量问题?
    我在做项目的时候发现了一个问题,就是在做批量删除时,当只有一条记录时,全选会失效,并且传入的数组长度没有赋值,请问该怎么判断。
搜索更多相关主题的帖子: 批量  

----------------解决方案--------------------------------------------------------

用它的索引不管是几个都能选上删除吧


----------------解决方案--------------------------------------------------------
页面:
<input type="checkBox" name="checkBox" />
<input type="checkBox" name="checkBox" />
<input type="checkBox" name="checkBox" />
<input type="checkBox" name="checkBox" />
Action 中:
用这个方法就能取出先中的 checkBox 了
String[] checkBox = request.getParameterValues("checkBox");
checkBox.length() 就能得到长度(也就是checkBox选中的个数)
----------------解决方案--------------------------------------------------------
  相关解决方案