password.jsp

来自「本系统是基于Struts+Hibernate开发的一套后台管理系统」· JSP 代码 · 共 80 行

JSP
80
字号
<%@page language="java" contentType="text/html; charset=GBK"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
 
<html> 
	<head>
		<title>User password change</title>
		<link href="../css/common.css" rel="stylesheet" type="text/css">
	</head>
	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
		  <tr> 
		    <td bgcolor="#FFFFFF">用户面板&gt;修改密码</td>
		  </tr>
		  <tr>
		    <td bgcolor="#cccccc">&nbsp;</td>
		  </tr>
		</table>
		<html:form action="/admin/password.do?action=save" onsubmit="javascript:return check_form(this);">
		  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
		  <tr> 
		    <td width="43%" align="right"><bean:message key="message.password.old"/> :</td>
		    <td width="57%">
		      <html:password property="old_pwd"/><html:errors property="old_pwd"/>
		    </td>
		  </tr>
		  <tr> 
		    <td width="43%" align="right"><bean:message key="message.password.new"/> :</td>
		    <td width="57%">
		       <html:password property="new_pwd"/><html:errors property="new_pwd"/>
		    </td>
		  </tr>
		  <tr> 
		    <td width="43%" align="right"><bean:message key="message.password.confirm"/> :</td>
		    <td width="57%">
		       <html:password property="new_pwd2"/><html:errors property="new_pwd2"/>
		    </td>
		  </tr>
		  <tr align="center"> 
		      <td colspan="2">
				    <logic:present name="InfoTips" scope="request">
				      <div>
				        <bean:message key="message.login.status"/>
				        <bean:write name="InfoTips" property="tipsInfo"/>
				      </div>
				    </logic:present><br>
					<html:submit>
						<bean:message key="button.submit.value"/>
					</html:submit>
					<html:reset>
						<bean:message key="button.reset.value"/>
					</html:reset>
		    </td>
		  </tr>
		  </table>
		</html:form>
	</body>
</html>
<script Language="JavaScript">
function check_form(theForm){
 if (theForm.old_pwd.value.length < 1) {
    alert("Please add your old password!");
    theForm.old_pwd.focus();
    return (false);
   }
 if (theForm.new_pwd.value.length < 1) {
    alert("Please add your new password!");
    theForm.new_pwd.focus();
    return (false);
   }
   if (theForm.new_pwd2.value != theForm.new_pwd.value) {
    alert("Your new password is wrong!Repeat add new password");
    theForm.new_pwd.focus();
    return (false);
   }
    return true;
 }
</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?