add.jsp~40~
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- <%@page contentType="text/html; charset=gb2312"%>
- <%@ page import="java.sql.*" %>
- <%@ page import="proj112.*" %>
- <html>
- <body>
- <p align="center"><IMG height=127 width=793 src="image/003.jpg"></IMG></P>
- <jsp:useBean id="a" class="proj112.ConnDB" scope="page">
- </jsp:useBean>
- <script language="JavaScript">
- <!--
- function del(id)
- {
- if (confirm("您确信要删除吗?") )
- top.location="del.jsp?id="+id
- }
- </script>
- <% request.setCharacterEncoding("gb2312");
- ResultSet rs = user.executeQuery("select * from std"); %>
- <table align="center" width="100%" border=2 bordercolorlight="#CC99FF" cellpadding="2" bordercolordark="#FFFFFF" cellspacing="2">
- <tr><td align="center" colspan=6><font color="blue" size="5">所有学生相关信息</font>
- <td align="center"><a href="addForm.jsp">添加一条纪录</a></div></td>
- </td>
- </tr>
- <tr>
- <td align=center><font color="#338822"><b> 学号 </font> </td>
- <td align=center><font color="#338822"><b> 姓名 </font> </td>
- <td align=center><font color="#338822"><b> 密码 </font> </td>
- <td align=center><font color="#338822"><b> 地址 </td>
- <td align=center><font color="#338822"><b> 年龄 </td>
- <td align=center><font color="#338822"><b> 宿舍 </td>
- <td align=center><font color="#338822"><b> 管理 </td>
- </tr>
- <% while (rs.next()) { //取得下一条记录 %>
- <tr>
- <td> <%=rs.getString("num")%> </td>
- <td> <%=rs.getString("UserName")%> </td>
- <td> <%=rs.getString("PassWord")%> </td>
- <td> <%=rs.getString("addr")%> </td>
- <td> <%=rs.getString("age")%> </td>
- <td> <%=rs.getString("bedroom")%> </td>
- <td align="center" width=20%><a href="getEditForm.jsp?id=<%=rs.getShort(1)%>">修改</a> | <a href="javascript:del(<%=rs.getShort(1)%>)">删除</a></td>
- </tr>
- <% }
- rs.close();
- %>
- </table>
- <br>
- <br>
- <br>
- <br>
- <p align=center>
- <a href=javascript:history.back();>返回</a> </p>
- </body>
- </html>