jsp中实现批量删除(2)
来源:未知 责任编辑:责任编辑 发表时间:2014-05-20 18:33 点击:次
while(rst1.next())
{
if(i%2==0)
setcolor="#ffffff";
else
setcolor="#D9D9D9";
%>
<tr bgcolor=<%=setcolor%>>
<td width="10%" align="center"><input type="checkbox" name="selectdelete" value="<%=rst1.getString(1).trim()%>"></td>
<td width="10%" align="center"><font face="楷体_GB2312" size="3"><%=rst1.getString(1).trim()%></font></td>
<td width="10%" align="center"><font face="楷体_GB2312" size="3"><%=rst1.getString(3).trim()%></font></td>
<td width="10%" align="center"><font face="楷体_GB2312" size="3"><%=rst1.getString(2).trim()%></font></td>
<td width="20%" align="center"><font face="楷体_GB2312" size="3"><%=rst1.getString(4).trim()%></font></td>
<td width="10%" align="center"><font face="楷体_GB2312" size="3"><%=rst1.getInt(6)%></font></td>
</tr>
<%
i++;
}
rst1.close();
}
catch(Exception e){}
%>
<tr><td colspan="3"> </td>
<td align="center">
<input type="submit" value="删 除" onclick="return confirm('你确定所选?')"></td></tr>
</table>
</form>
</div>
</div>
</body>
</html>
处理页:
public class CommonDeleteServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
相关新闻>>
- 发表评论
-
- 最新评论 更多>>