?? alterinfo.jsp
字號(hào):
<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><%@page import="java.sql.*"%><%--The taglib directive below imports the JSTL library. If you uncomment it,you must also add the JSTL library to the project. The Add Library... actionon Libraries node in Projects view can be used to add the JSTL 1.1 library.--%><%--<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> --%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>網(wǎng)上銀行</title> </head> <body background="D:/YJ/YJ1.23/NetBank/background/0003.gif"> <% String loginID = (String)session.getAttribute("userName"); String accountID = ""; String addr = ""; String phone = ""; String mobilePhone = ""; String email = ""; String IDcard = ""; String dbUrl = "jdbc:odbc:afei"; String user = "scott"; String password = "tiger"; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn = DriverManager.getConnection(dbUrl,user,password); String sql = "Select netMember.accountID,addr,phone,mobilePhone,email,IDcard from netMember,deAccount where netMember.accountID = deAccount.accountID and loginID = '"+loginID+"'"; Statement stat = conn.createStatement(); ResultSet result = stat.executeQuery(sql); if(result.next()) { accountID = result.getString("accountID"); addr = result.getString("addr"); phone = result.getString("phone"); mobilePhone = result.getString("mobilePhone"); email = result.getString("email"); IDcard = result.getString("IDcard"); } conn.close(); } catch(Exception connectException) { out.println(connectException); out.println("連接數(shù)據(jù)庫(kù)失敗! 請(qǐng)與管理員聯(lián)系!"); } %> <form name="alter" action="UpdateInfo.jsp" method="POST"> <p align="center"> <font face="隸書(shū)" color="blue" size=3>修改資料</font> <p align="center"> <font face="隸書(shū)" color="blue" size=3>用戶名稱(chēng)</font> <input type="text" name="userName" value=<%=loginID%> disabled/> <p align="center"> <font face="隸書(shū)" color="blue" size=3>登陸密碼</font> <input type="password" name="userPassword" value="" /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>重復(fù)密碼</font> <input type="password" name="rePassword" value="" /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>服務(wù)密碼</font> <input type="password" name="servicePassword" value="" /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>重復(fù)密碼</font> <input type="password" name="reServicePassword" value="" /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>關(guān)聯(lián)帳號(hào)</font> <input type="text" name="accountID" value=<%=accountID%> disabled/> <p align="center"> <font face="隸書(shū)" color="blue" size=3>身份證號(hào)</font> <input type="text" name="ID" value=<%=IDcard%> disabled/> <p align="center"> <font face="隸書(shū)" color="blue" size=3>家庭住址</font> <input type="text" name="address" value=<%=addr%> /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>固定電話</font> <input type="text" name="phone" value=<%=phone%> /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>移動(dòng)電話</font> <input type="text" name="mobile" value=<%=mobilePhone%> /> <p align="center"> <font face="隸書(shū)" color="blue" size=3>電子郵箱</font> <input type="text" name="email" value=<%=email%> /> <p align="center"> <input type="submit" value="修改" name="commit" /> <input type="reset" value="重置" name="reset" /> </form> </body></html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -