Skip to content

Commit fdbc4d0

Browse files
committed
New: password show hide function added.
1 parent 642bc63 commit fdbc4d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dom/password_show.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// show password
2+
function togglePassword() {
3+
const passwordField = document.getElementById("password");
4+
if (passwordField.type === "password") {
5+
passwordField.type = "text";
6+
} else {
7+
passwordField.type = "password";
8+
}
9+
}
10+

0 commit comments

Comments
 (0)