?? modify.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" %>
<jsp:useBean id="db" scope="page" class="chatweb.conn" />
<html>
<head>
<title>
modify
</title>
<link href="../chat.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<script language="JavaScript" type="text/JavaScript">
function check(){
if(document.all.newPassword.value!=document.all.renewpassword.value){
window.alert("兩次輸入的密碼不一致");
}
else {
document.all.form1.submit();
}
}
</script>
<body bgcolor="#FFF7DD">
<div align="center">
<%
if(request.getMethod().toUpperCase().equals("POST")){
String oldPassword=request.getParameter("oldpassword");
String newPassword=request.getParameter("newPassword");
String user=session.getAttribute("username").toString();
if(db.modify(user,oldPassword,newPassword)){%>
<script language="JavaScript" type="text/JavaScript">
window.alert("密碼修改成功");
</script>
<%}
else{%>
<script language="JavaScript" type="text/JavaScript">
window.alert("密碼修改失敗");
</script>
<%}
}
%>
<br>
<form name="form1" method="post" action="">
<table width="80%" border="0" cellspacing="1" class="mytable">
<tr bgcolor="#FFF7DD">
<td nowrap>
<div align="right">舊密碼:</div></td>
<td width="90%">
<input name="oldpassword" type="password" id="oldpassword">
</td>
</tr>
<tr bgcolor="#FFF7DD">
<td nowrap>
<div align="right">新密碼:</div></td>
<td>
<input name="newPassword" type="password" id="newPassword"></td>
</tr>
<tr bgcolor="#FFF7DD">
<td nowrap>
<div align="right">重復新密碼:</div></td>
<td>
<input name="renewpassword" type="password" id="renewpassword" value=""></td>
</tr>
<tr bgcolor="#FFF7DD">
<td colspan="2" nowrap>
<div align="center">
<input type="button" name="Submit" value="提交" onClick="check()">
<input type="button" name="Submit2" value="取消" onClick="window.close()">
</div></td>
</tr>
</table>
</form>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -