Files
Hushian/Presentation/HushianWebApp/wwwroot/Before/js/site3c3c.js
mmrbnjd ff342a53c0 ...
2025-07-11 20:37:28 +03:30

30 lines
976 B
JavaScript

function showPassword(e, elementId) {
let inputElem = document.getElementById(elementId);
if (inputElem.type === "password") {
inputElem.type = "text";
if (e.target.classList.contains('mdi')) {
e.target.classList.add('mdi-eye-off');
e.target.classList.remove('mdi-eye');
}
else {
let child = e.target.children[0];
if (child) {
child.classList.add('mdi-eye-off');
child.classList.remove('mdi-eye');
}
}
} else {
inputElem.type = "password";
if (e.target.classList.contains('mdi')) {
e.target.classList.add('mdi-eye');
e.target.classList.remove('mdi-eye-off');
}
else {
let child = e.target.children[0];
if (child) {
child.classList.add('mdi-eye');
child.classList.remove('mdi-eye-off');
}
}
}
}