📄 stu-modi-passw.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" import="java.sql.*" errorPage="errorpage.jsp" %>
<%@ page import="java.sql.*"%><%--用javabean不行被迫这样用了---%>
<html>
<head>
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: large;
font-weight: bold;
color: #00FF00;
}
.STYLE2 {
font-size: large;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div align="center">
<%
String password = request.getParameter("textPassword");
String studentNu = (String)session.getAttribute("stuNum");
//out.print(studentNu);
//out.print(password);
String sqlyu = "UPDATE stu_login SET password ='"+password+"' WHERE number ='"+studentNu+"'";
Connection con;
Statement sql;
ResultSet rs;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException e){}
try {
con=DriverManager.getConnection("jdbc:odbc:login");
sql=con.createStatement();
sql.executeUpdate(sqlyu);
con.close();
}catch(SQLException e){
out.println(e);
}
%>
<span class="STYLE1">密码修改成功,请记住修改后的密码。</span> </div>
<p align="center" class="STYLE2"><a href="student-login.jsp" target="_self">重新登陆</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -