...
This commit is contained in:
30
Presentation/HushianWebApp/wwwroot/Before/js/site3c3c.js
Normal file
30
Presentation/HushianWebApp/wwwroot/Before/js/site3c3c.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user