<!DOCTYPE html>
<html>
<body>
<script language="javascript">
function check()
{
var userPwReal="${sessionScope.admin.apassword}";
if(document.formPw.userPw1.value =="")
{
alert("新密码不能空");
return ;
}
if(document.formPw.userPw1.value != document.formPw.userPw2.value)
{
alert("两次输入的密码不一致");
return ;
}
}
</script>
<form name="formPw">
<tr bgcolor="#FFFFFF">
<td >
登录名:
</td>
<td >
<input type="text" value="${sessionScope.admin.aname }" name="admin.aname" readonly/>
</td>
</tr>
<tr >
<td >
原密码:
</td>
<td >
<input type="password" id="apassword" size="22"/>
</td>
</tr>
<tr >
<td >
新密码:
</td>
<td >
<input type="password" id="userPw1" size="22"/>
</td>
</tr>
<tr>
<td >
确认密码:
</td>
<td >
<input type="password" name="userPw2" size="22"/>
</td>
</tr>
<tr>
<td >
</td>
<td >
<input type="button" value="修改" onclick="check()"/>
<input type="reset" value="重置"/>
<img id="indicator" src="img/loading.gif" alt="Loading..." style="display:none"/>
</td>
</tr>
</from>
</body>
</html>
js中document.form的名字.input的名字.value