document.getElementById('passwordBox').style.display = 'none'; function showPasswordBox() { const email = document.getElementById('email').value; if (email.length > 0) { document.getElementById('emailBox').style.display = 'none'; document.getElementById('passwordBox').style.display = 'block'; document.getElementById('entered-email').innerHTML = email; } } function onEyeClick() { const ele = document.getElementById('showPassword'); const password = document.getElementById('password'); if (password.value.length > 0) { document.getElementById('password').value = password.value; password.focus(); if (ele.checked) { password.setAttribute('type', 'text'); } else { password.setAttribute('type', 'password'); } } } function onPasswordFocus() { const password = document.getElementById('password'); if (password.value.length > 0) { document.getElementById('password-label').classList.add('password-fixed'); } else { document .getElementById('password-label') .classList.remove('password-fixed'); } }