password.jsp

来自「Hibernate (著译者: 陈天河等)项目开发宝典本书以Hibernate为」· JSP 代码 · 共 78 行

JSP
78
字号
<%@ include file="/pub/jsp/common.jsp" %>
<hxex:authority />
<html>
	<head>
		<title><bean:message key="user.btn.password"/></title>
		<link rel="stylesheet" href="pub/css/common.css">
		<script>
			function validateTotal( form )
			{
				if( form.oldpassword.value.length==0 )
				{
					alert( '<bean:message key="user.msg.oldpassword"/>' );
					form.oldpassword.focus();
					return false;
				}
				if( form.password.value.length==0 )
				{
					alert( '<bean:message key="user.msg.newpassword"/>' );
					form.password.focus();
					return false;
				}
				if( form.password.value!=form.repassword.value )
				{
					alert( '<bean:message key="teacher.msg.passwordsame"/>' );
					form.repassword.focus();
					return false;
				}
				return true;
			}
		</script>
	</head>
	<body>
		<center>
			<h1><bean:message key="user.btn.password"/></h1>
			<html:form action="/logon" method="post" focus="oldpassword" 
				onsubmit="return validateTotal( this );">
			<html:hidden property="p" value="password"/>
			<html:errors />
			<table border="0">
				<tr>
					<td><bean:message key="userForm.oldpassword"/></td>
					<td><input type="password" name="oldpassword" /></td>
				</tr>
				<tr>
					<td><bean:message key="userForm.newpassword"/></td>
					<td><input type="password" name="password" /></td>
				</tr>
				<tr>
					<td><bean:message key="userForm.confirmpassword"/></td>
					<td><input type="password" name="repassword" /></td>
				</tr>
				<tr>
					<td align="center" colspan="2">
						<html:submit>
							<bean:message key="btn.save"/>
						</html:submit>
						&nbsp;&nbsp;
						<html:reset>
							<bean:message key="btn.reset"/>
						</html:reset>
					</td>	
				</tr>
			</table>
			</html:form>
			<table border="0">
				<tr>
					<td>
						<html:link href="logon.do?p=homepage">
							<bean:message key="btn.back" />
						</html:link>
					</td>
				</tr>
			</table>
			<p>&nbsp;<p>
			<img src="images/chgpassword.jpg">
		</center>
	</body>
</html>

⌨️ 快捷键说明

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