ajout mot de passe en clair avec js sur page de connexion

This commit is contained in:
ben
2025-12-05 11:47:49 +01:00
parent b698012bfe
commit 80f859c514
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
const password = document.getElementById('password');
const confirmPassword = document.getElementById('confirmPassword');
const showPasswordCheckbox = document.getElementById('showPassword');
showPasswordCheckbox.addEventListener('change', function() {
if (this.checked) {
password.type = 'text';
confirmPassword.type = 'text';
} else {
password.type = 'password';
confirmPassword.type = 'password';
}
});