-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (33 loc) · 1.14 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
<!DOCTYPE html>
<html>
<head>
<title>Password Generator</title>
<script type="application/javascript" src="gen-password.js"></script>
<style type="text/css">
div { margin: 0 0 .2em }
input[type="number"] { width: 3em }
</style>
</head>
<body>
<form>
<div>
Randomness source: <code id="random_source">(uninitialized)</code>
<script type="application/javascript">
document.getElementById('random_source').innerText = random_source
</script>
</div>
<div>
<button type="button" onclick="this.form.pw.value = gen_password(this.form.n.value, this.form.method.value)">Generate Password</button>
<input type="text" name="pw" size="60" />
</div>
<div>
<input type="number" name="n" min="1" value="4" />
<select name="method">
<option value="dictionary">Word(s)</option>
<option value="ascii">ASCII Character(s)</option>
<option value="alphanumeric">Alphanumeric Character(s)</option>
</select>
</div>
</form>
</body>
</html>