<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改用户密码</title>
<script>
function validatePassword() {
var password1 = document.getElementById("password1").value;
var password2 = document.getElementById("password2").value;
if (password1 !== password2) {
alert("新密码和确认密码不一致,请重新输入。");
return false;
}
return true;
}
</script>
</head>
<body>
<h1>修改用户密码</h1>
<form action="修改个人密码1.jsp" method="post" onsubmit="return validatePassword()">
<label for="password">原密码:</label>
<input type="password" name="password" id="password" required>
<br><br>
<label for="password1">新密码:</label>
<input type="password" name="password1" id="password1" required>
<br><br>
<label for="password2">确认密码:</label>
<input type="password" name="password2" id="password2" required>
<br><br>
<input type="submit" value="修改">
</form>
</body>
</html>