-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset_password.html
More file actions
43 lines (39 loc) · 1.35 KB
/
reset_password.html
File metadata and controls
43 lines (39 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reset Password</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class='form-container'>
<form class='my-form' onsubmit='return validateNewPassword()'>
<h2>New Password</h2>
<div class='form-control'>
<label for='new_password'>Password:</label>
<input type='password' id='new_password' name='new_password'placeholder='Enter your new password'>
</div>
<div class='form-control'>
<input type='submit' class='btn' value='Reset Password'>
</div>
</form>
</div>
<script>
function validateNewPassword() {
var newPassword = document.getElementById('new_password').value;
if (!newPassword) {
alert('Please enter your new password.');
return false;
}
if (newPassword.length < 5) {
alert('Password must be at least 5 characters long.');
return false;
}
alert('Password is changed successfully.');
window.location.href = 'index.html';
return false;
}
</script>
</body>
</html>