Created
July 7, 2022 07:11
-
-
Save jangaraev/0458942c867adce32e0cc13eb26d020f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const messageEl = document.querySelector('.message'); | |
password.addEventListener('keyup', function (e) { | |
if (e.getModifierState('CapsLock')) { | |
messageEl.textContent = 'Caps lock is on'; | |
} else { | |
messageEl.textContent = ''; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment