?? chenge.jsp
字號:
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<html>
<head>
<title>chenge</title>
<script type="javascript">
function check()
{
if(document.form1.oldUserPwd.value=="")
{
alert("請輸入原始密碼");
document.form1.oldUserPwd.focus();
return false;
}else if(document.form1.newUserPwd.value=="")
{
alert("請輸入新密碼");
document.form1.newUserPwd.focus();
return false;
}else if(document.form1.newUserPwd.value!=document.form1.reigthUserPwd.value)
{
alert("新密碼和確認密碼不一致!");
return false;
}
else if(document.form1.reigthUserPwd.value=="")
{
alert("請輸入確認密碼");
document.form1.reigthUserPwd.focus();
return false;
}else
{
return true;
}
}
</script>
</head>
<body bgcolor="#ffffff">
<jsp:include flush="false" page="index.jsp"/>
<center>
<form name="form1" action="chengeservlet" method="POST">
<table>
<tr>
<td> 用戶
<font color="red">${sessionScope.user.userName} </font>
歡迎您登陸
</td>
</tr>
</table>
<br />
<br />
<c:if test="${empty requestScope.chengeresult}">
<table>
<tr>
<td>原始密碼: <input type="password" name="oldUserPwd" /></td>
</tr>
<tr>
<td>新密碼: <input type="password" name="newUserPwd" /></td>
</tr>
<tr>
<td>確認密碼: <input type="password" name="reigthUserPwd" /></td>
</tr>
<tr>
<td><input type="submit" onclick="check()" value="修改" /><input type="reset" value="重置" /></td>
</tr>
</table>
</c:if>
<c:if test="${requestScope.chengeresult==true}">
<table>
<tr>
<td><font color="red">恭喜密碼修改成功!下次可以使用新密碼登陸!</font></td>
</tr>
<tr>
<td><a href="index.jsp">繼續瀏覽</a></td>
<td><a href="oprater?action=out">重新登陸</a></td>
</tr>
</table>
</c:if>
<c:if test="${requestScope.chengeresult==false}">
<table>
<tr>
<td><font color="red">原始密碼不正確,請重新輸入,修改失敗!</font></td>
</tr>
<tr>
<td><a href="chenge.jsp">繼續修改</a></td>
<td><a href="index.jsp">放棄修改</a></td>
</tr>
</table>
</c:if>
</form>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -