我有jsp之类的数据库中的列表,我希望使用带有单行和多行的复选框删除如何使用行ID删除它我有jsp代码
<table id="example" class="table table-bordered table-striped dashboardtable" cellspacing="0" >
<thead class="thead">
<tr>
<th class="head" style="width:14%"><span>Serial Number</span></th>
<th class="head" ><span>Images List</span></th>
<th class="head"><span>Image Preview</span></th>
<th class="head" ><span>Email Id</span></th>
<th class="head" ><span>Sent Mail Time Span</span></th>
<th class="head" ><span>Resend Image</span></th>
<th></th>
<th class="head"><input type="checkbox" id="selecctall"/>Select All</th>
</tr>
</thead>
<tbody>
<c:forEach items="${emailImagesList}" var="al">
<tr>
<td style="width:14%">${al.serialNumber}</td>
<td >${al.mailImageName}</td>
<td><img src="<%=request.getContextPath()%>/emailImage/${al.id}/" height="100" width="150" ></td>
<td>${al.emailId} <img src="<%=request.getContextPath()%>/resources/images/edit.png" onclick="showpopup1('${al.id},${al.emailId}');"/></td>
<td>${al.mailSentTime}</td>
<td><a href="#" onclick="showpopup('${al.id},${al.emailId}');">Resend Image</a></td>
<td> <img onclick="javascript:exportToForm('${al.id}')" src="<%=request.getContextPath()%>/resources/images/delete.png" /></td>
<td><input class="checkbox1" type="checkbox" name="${al.id}"/><a href="#" onclick="javascript:deleteToForm('${al.id}')" >delete</a></td>
</tr>
</c:forEach>
和脚本是
function deleteToForm(id){
var del = confirm("Press Ok to delete!");
if (del == true ) {
window.location="<%=request.getContextPath()%>/deleteImageByUser?id="+id
}
}
如何获取所有表列表ID及其状态为0