changePwd.jsp
上传用户:jhoneliu
上传日期:2022-07-31
资源大小:950k
文件大小:2k
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="css/mycss.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <%
- if(session.getAttribute("userid")== null || session.getAttribute("userid").equals(""))
- {
- response.sendRedirect("index.jsp");
- }
- %>
- <jsp:include flush="true" page="head.jsp"/><br /><br />
- <form name="form1" method="post" action="userEdit.jsp" onSubmit="return check();">
- <br><br><br><br>
- <p align="center"><font size="4" color="red">修改密码</font></p>
- <table width="400" border="1" align="center" cellpadding="3" cellspacing="1">
- <tr>
- <td width="148"><div align="right">旧密码:</div></td>
- <td width="231"><input name="oldPwd" type="password" id="oldPwd" size="20" maxlength="20"></td>
- </tr>
- <tr>
- <td><div align="right">新密码: </div></td>
- <td><input name="pwd" type="password" id="pwd" size="20" maxlength="20"></td>
- </tr>
- <tr>
- <td><div align="right">校验新密码:</div></td>
- <td><input name="confirmPwd" type="password" id="confirmPwd" size="20" maxlength="20"></td>
- </tr>
- </table>
- <p align="center">
- <input type="submit" name="Submit" value=" 保 存 ">
- </p>
- </form>
- <br><br><br><br>
- <jsp:include flush="true" page="bottom.jsp"/>
- </body>
- </html>
- <script language="javascript">
- function check()
- {
- if(form1.oldPwd.value==""){
- alert("请输入旧密码");
- form1.oldPwd.focus();
- return false;
- }
- if(form1.pwd.value==""){
- alert("请输入新密码,新密码不允许为空");
- form1.pwd.focus();
- return false;
- }if(form1.pwd.value !=form1.confirmPwd.value){
- alert("新密码与校验密码不符");
- form1.confirmPwd.focus();
- return false;
- }
- return true;
- }
- </script>