From 9554f58562541ceca856ef12e7adbebc9705ade4 Mon Sep 17 00:00:00 2001 From: Srishty M Date: Sat, 4 Nov 2023 16:58:15 +0530 Subject: [PATCH] fix: 3rd que --- question-1/main.html | 41 +++++++++++++++++++++++++++++++++++++++ question-3/index.html | 45 +++++++++++++++++++++++++++++++++++++++++++ question-3/script.js | 12 ++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 question-1/main.html create mode 100644 question-3/index.html create mode 100644 question-3/script.js diff --git a/question-1/main.html b/question-1/main.html new file mode 100644 index 0000000..283de85 --- /dev/null +++ b/question-1/main.html @@ -0,0 +1,41 @@ + + + + Page Title + + + + + + +
+ div1 +
+ div2 +
+
+ + diff --git a/question-3/index.html b/question-3/index.html new file mode 100644 index 0000000..e0da20d --- /dev/null +++ b/question-3/index.html @@ -0,0 +1,45 @@ + + + + + + Password Peek-a-Boo + + + + + +
+ + 👁 +
+ + + diff --git a/question-3/script.js b/question-3/script.js new file mode 100644 index 0000000..81c8649 --- /dev/null +++ b/question-3/script.js @@ -0,0 +1,12 @@ +const passwordInput = document.getElementById("password-input"); +const eyeIcon = document.getElementById("eye-icon"); + +eyeIcon.addEventListener("click", () => { + if (passwordInput.type === "password") { + passwordInput.type = "text"; + eyeIcon.innerHTML = "👀"; // Closed-eye icon + } else { + passwordInput.type = "password"; + eyeIcon.innerHTML = "👁"; // Open-eye icon + } +});