📄 modifypwd.jsp
字号:
<%@ page contentType="text/html; charset=GB2312" pageEncoding="GBK"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>学生管理系统</title>
<link rel="stylesheet" type="text/css" media="all" href="./../../css/StyleText.css" />
<script type="text/javascript" language="javascript">
var xmlhttp;
var identity;
function modify(){
var id="<c:out value="${admin.id}" />";
var pwd="<c:out value="${admin.passWord}" />";
var oldpass=document.xgmm.oldpass.value;
var newpass=document.xgmm.newpass.value;
var repass=document.xgmm.repass.value;
if(oldpass != pwd){
window.alert("旧密码不正确!");
return false;
}
if(newpass != repass){
window.alert("请确保新密码和确认密码相同!");
return false;
}
xmlhttp=getxmlhttp();
if(xmlhttp){
identity=new Date();
var i = Math.floor(Math.random()*1000);
xmlhttp.open("get","/xsglxt/modifypwd?id="+id+"&newpass="+newpass+"&jj="+i,false);//"&oldpass="+oldpass+
xmlhttp.onreadystatechange=info;
xmlhttp.send(null);
}
//window.document.location.reload();
}
function getxmlhttp(){
if(window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
}else if(typeof ActiveXObject != "undefined"){
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlhttp;
}
function info(){
if (xmlhttp.readyState==4) {
var response = xmlhttp.responseText;
if(response=="密码修改成功,请用新密码重新登陆"){
window.alert(response);
//window.parent.href='/xsglxt/logout';
window.parent.location.href='/xsglxt/logout';
}else{
//info.innerHTML=response;
window.alert(response);
}
}
}
</script>
</head>
<body id="mainFrame" >
<form action="" name="xgmm">
<div class="getgoods">
<div class="body">
<div class="getgoods-head">
<img src="./../../images/ico2.gif" align="absMiddle" />
修改密码
</div>
<div class="getgoods-putin">
<div class="getgoods-list">
<div class="getgoods-listL">
用户名:
</div>
<div class="getgoods-listR">
<input type="text" readonly="readonly" name="name" value="<c:out value="${admin.name}"/>"/>
</div>
</div>
<div class="getgoods-list">
<div class="getgoods-listL">
旧密码:
</div>
<div class="getgoods-listR">
<input type="password" name="oldpass"/>
</div>
</div>
<div class="getgoods-list">
<div class="getgoods-listL">
新密码:
</div>
<div class="getgoods-listR">
<input type="password" name="newpass"/>
</div>
</div>
<div class="getgoods-list">
<div class="getgoods-listL">
确认新密码:
</div>
<div class="getgoods-listR">
<input type="password" name="repass"/>
</div>
</div>
</div>
<div class="foot">
<div class="footlist">
<a href="#" onClick="modify()">修改</a>
</div>
</div>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -