-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
46 lines (38 loc) · 1.64 KB
/
demo.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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>X Password</title>
<meta name="viewport" content="width=device-width" />
<script src="./x-password.js" type="module"></script>
<style>
.flex {
display: inline flex;
gap: 1ch;
}
.items-center {
align-items: center;
}
</style>
</head>
<body>
<form action="#">
<label for="password">Password</label>
<input autocomplete="none" data-1p-ignore type="password" name="password" id="password" value="password">
<br>
<label for="password_confirm">Confirm Password</label>
<div class="flex items-center">
<input autocomplete="none" data-1p-ignore name="password_confirm" placeholder="type: password" id="password_confirm" is="x-password" value="hidden" confirm-target="password">
<button type="button" onclick="document.getElementById('password_confirm').toggleAttribute('visible')">Toggle Visibility</button>
</div>
<br>
<label for="password_confirm">Visible Password</label>
<div class="flex items-center">
<input autocomplete="none" data-1p-ignore name="visibile_password" id="visibile_password" is="x-password" value="not hidden" visible>
<button type="button" onclick="document.getElementById('visibile_password').toggleAttribute('visible')">Toggle Visibility</button>
</div>
<br>
<button>Go</button>
</form>
</body>
</html>