36 lines
475 B
JavaScript
36 lines
475 B
JavaScript
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';
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|