- 前台JSP的代码
- Servlet应怎样读取多个ID来进行删除
- 数据库如何操作删除多组数据
此项目用的是C3p0数据源,采用MVC模式,实现步骤可以供大家参考。
前台数据呈现如图所示:
为了方便看到实现的功能,样式我删掉了。样式就是用了简单的Bootstrap
<div>
<div>
<input type="button" onclick="delCheck()" value="删除选中">
<button type="button" id="button">添加景点</button>
</div>
<table>
<tr height="50px;">
<th ><input type="checkbox" onclick="checkAll(this)"></th>
<th >ID</th>
<th >景区名</th>
<th >图片</th>
<th >简介</th>
<th >操作</th>
</tr>
<c:forEach items="${list}" var=