2026-04-13 19:04:12 +05:30

14 lines
438 B
JavaScript

function togglePassword() {
const password = document.getElementById("password");
const icon = document.getElementById("eyeIcon");
if (password.type === "password") {
password.type = "text";
icon.classList.remove("fa-eye");
icon.classList.add("fa-eye-slash");
} else {
password.type = "password";
icon.classList.remove("fa-eye-slash");
icon.classList.add("fa-eye");
}
}