change.jsp~62~
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- <%@ page contentType="text/html; charset=GBK" %>
- <%@ page import="java.sql.*" %>
- <%@ page language="java" %>
- <%@ page import="java.util.*" %>
- <%@ page import="proj112.*" %>
- <jsp:useBean id="a" scope="page" class="proj112.dbconn"/>
- <html>
- <body>
- <% request.setCharacterEncoding("GBK"); %>
- <head>
- <title>
- 修改学生信息
- </title>
- </head>
- <FORM Action="edit.jsp" Method="post" name="edit">
- <table align="center" border="2" width="100%" bordercolorlight="#CC99FF" cellpadding="2" bordercolordark="#FFFFFF" cellspacing="2">
- <%
- String id2=request.getParameter("id");
- //out.print(id);
- String sql="select * from student where stu_name='"+id2+"'";
- ResultSet rs = a.executeQuery(sql);
- while(rs.next()) { %>
- <tr> <td align=center colspan=2><font color=blue size=5><b>修改学生信息</font></td>
- <tr align=center><td>姓名:</td><td><INPUT TYPE="text" NAME="stu_name" value=<%=rs.getString(1)%>></td>
- </tr>
- </tr>
- <tr align=center>
- <td>学号:</td><td><INPUT TYPE="text" NAME="stu_id" value=<%=rs.getString(2)%>></td>
- </tr>
- <tr align=center><td>
- 性别:</td><td><INPUT TYPE="text" NAME="sex" value=<%=rs.getString(4)%>></td>
- </tr>
- <tr align=center><td>
- 专业:</td><td><INPUT TYPE="text" NAME="dept" value=<%=rs.getString(5)%>></td>
- </tr>
- <tr align=center><td>
- 民族:</td><td><INPUT TYPE="text" NAME="mz" value=<%=rs.getString(6)%>></td>
- </tr>
- <tr align=center><td>
- 政治面貌:</td><td><INPUT TYPE="text" NAME="zzmm" value=<%=rs.getString(7)%>></td>
- </tr>
- <% } rs.close();%>
- <FORM Action="edit.jsp" Method="post">
- <tr><td align=center colspan=2>
- <INPUT align=center TYPE="submit" value="提交"> </td>
- </tr>
- </table>
- </form>
- <br>
- <br>
- <br>
- <br>
- <p align=center>
- <a href="std.jsp";>返回</a> </p>
- </body>
- </html>