87,907
社区成员
发帖
与我相关
我的任务
分享
<h1>
我的好友录
</h1>
<br>
<a href="add.jsp">添加新记录</a>
<a href="modify.jsp">修改选中记录</a>
<a href="delete.jsp" onClick="JavaScript:document.getElementById('id1').submit()">删除选中记录</a>
<hr>
<form name=friend id=id1 action=delete.jsp method=post>
<table width=100% align="center">
<tr>
<th>修改</th><th>删除</th><th>姓名</th><th>性别</th><th>年龄</th><th>QQ</th><th>电话</th>
<th>email</th><th>地址</th>
</tr>
<%
int id = 0, delIndex = 0;
Friends gf = new Friends();
ResultSet rs = gf.getList();
while (rs.next()) {
out.print("<tr><td><input type=radio name=modify value=" + id + "></td>");
out.print("<td><input type=checkbox name=delete value="+ delIndex + "></td> ");
out.print("<td>" + rs.getString("name") + "</td>");
out.print("<td>" + rs.getString("sex") + "</td>");
out.print("<td>" + rs.getString("age") + "</td>");
out.print("<td>" + rs.getString("qq") + "</td>");
out.print("<td>" + rs.getString("telephone") + "</td>");
out.print("<td>" + rs.getString("email") + "</td>");
out.print("<td>" + rs.getString("address") + "</td>" + "</tr>");
id++;
delIndex++;
}
%>
</table>
<input type=submit value="提交">
</form>
<%@ include file="/WEB-INF/footer.jsp"%>