?? updatedoctorpasssword.jsp
字號(hào):
<%@ page language="java" import="com.tsinghuait.st0717.hospitalsystem.service.*,java.util.*" pageEncoding="gbk"%>
<jsp:directive.page import="com.tsinghuait.st0717.hospitalsystem.dto.Doctor"/>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/Css/LightBlue_Css.css"/>
<title>醫(yī)生信息表</title>
<script type="text/javascript">
function check(form){
if(form.loginPassword2.value==""){
alert("請(qǐng)輸入密碼,檢查您輸入的是否正確!");
}else{
document.doctorpassForms.submit();
}
}
</script>
</head>
<body>
<form action="<%=request.getContextPath()%>/updatePasswordServlet?opertion=2" method="post" name="doctorpassForms">
<div>
<center>
<table class="simple textCss">
<tr>
<th colspan="2" valign="center" class="title">醫(yī)生密碼修改</th>
</tr>
<tr>
<th width="30%" align="right">登錄名:</th>
<td><input type="text" name="loginName" class="txt" value="<%=session.getAttribute("doctorName")%>" disabled="disabled"></td>
</tr>
<tr>
<th width="30%" align="right">舊密碼:</th>
<td>
<input type="password" name="loginPassword" class="txt" onchange="pass(this);">
<script type="text/javascript">
function pass(obj){
var ob=obj.value;
var pa=<%=(String)session.getAttribute("doctorPassword")%>
if(ob!=pa){
alert("您輸入的密碼和登錄時(shí)的密碼不一樣!!");
obj.value="";
return;
}
}
</script>
</td>
</tr>
<tr>
<th width="30%" align="right">新密碼:</th>
<td><input type="password" name="loginPassword1" class="txt" onchange="doctorpass1();">
<script type="text/javascript">
function doctorpass1(){
var pass1=document.doctorpassForms.loginPassword1.value;
var pa2=<%=(String)session.getAttribute("doctorPassword")%>
if(pass1==pa2){
alert("您輸入的新密碼和原密碼相同!!");
document.doctorpassForms.loginPassword1.value="";
return ;
}
}
</script>
</td>
</tr>
<tr>
<th width="30%" align="right">確認(rèn)密碼:</th>
<td>
<input type="password" name="loginPassword2" class="txt" onchange="doctorpass();">
<script type="text/javascript">
function doctorpass(){
var pass3=document.doctorpassForms.loginPassword1.value;
var pass2=document.doctorpassForms.loginPassword2.value;
if(pass3!=pass2){
alert("您兩次輸入的密碼不一樣!!");
document.doctorpassForms.loginPassword2.value="";
return;
}
}
</script>
</td>
</tr>
<tr>
<td colspan="2" background="imgs/color/color_qianse.jpg"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value="提交" class="buttonClass" onclick="return check(this.form);"></td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -