介绍
比如批量删除等
html代码:
<form action="/student/deleteByIds" method="post">
<input type="submit" value="批量删除">
<table>
<tr>
<td></td>
<td>姓名</td>
</tr>
<tr>
<td><input type="checkbox" name="ids" value="1"></td>
<td>李雷</td>
</tr>
<tr>
<td><input type="checkbox" name="ids" value="2"></td>
<td>韩梅梅</td>
</tr>
<tr>
<td><input type="checkbox" name="ids" value="3"></td>
<td>lucy</td>
</tr>
</table>
</form>
Controller代码:
@RequestMapping("/deleteByIds")
public String deleteByIds(String[] ids){
for(Object id:ids){
System.out.println(id);
}
return "deleteSuccess";
}

