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 + } +});