?? 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 + -