-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.html
90 lines (77 loc) · 1.93 KB
/
index.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Random Password Generator</title>
<script src="/script.js"></script>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f4f4f9;
}
.container {
text-align: center;
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
h1 {
color: #333;
}
.controls label {
display: block;
margin: 8px 0;
}
input[type="text"] {
width: 80%;
padding: 8px;
margin-top: 10px;
}
button {
padding: 10px 20px;
margin-top: 10px;
cursor: pointer;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
}
button:hover {
background-color: #0056b3;
}
.strength meter {
width: 100%;
height: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1>Random Password Generator</h1>
<div class="controls">
<label for="length">Password Length:</label>
<input type="number" id="length" min="8" max="32" value="12">
<label><input type="checkbox" id="uppercase" checked> Include Uppercase Letters</label>
<label><input type="checkbox" id="lowercase" checked> Include Lowercase Letters</label>
<label><input type="checkbox" id="numbers" checked> Include Numbers</label>
<label><input type="checkbox" id="symbols" checked> Include Symbols</label>
</div>
<button onclick="generatePassword()">Generate Password</button>
<div class="output">
<input type="text" id="password" readonly>
<button onclick="copyToClipboard()">Copy</button>
</div>
<div class="strength">
<span>Password Strength: <meter id="strength-meter" min="0" max="4" value="0"></meter></span>
</div>
</div>
<script src="script.js"></script>
</body>
</html>