Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript caps lock

 const password = document.querySelector('#password');
 const message = document.querySelector('.message');

 password.addEventListener('keyup', function (e) {
     if (e.getModifierState('CapsLock')) {
         message.textContent = 'Caps lock is on';
     } else {
         message.textContent = '';
     }
 });
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to make required field in jquery false 
Javascript :: convert timestamp to date javascript 
Javascript :: make select option selected javascript 
Javascript :: javascript how to know the end of the scroll 
Javascript :: set css variable from javascript 
Javascript :: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project electronicbookshop: Compilation failure 
Javascript :: scroll down up js 
Javascript :: get data from csv using vue js 
Javascript :: uppercase in word javascript 
Javascript :: mui how to set background in theme 
Javascript :: javascript length 
Javascript :: return random rows sqlite 
Javascript :: javascript object destructuring rename 
Javascript :: remove all white space from text javascript 
Javascript :: lodash pascal case 
Javascript :: cypress have attribute 
Javascript :: js select element inside of div 
Javascript :: how to detect onend reach of scrollview in react native 
Javascript :: express cors error 
Javascript :: webpack set mode to development 
Javascript :: nuxt js emit event 
Javascript :: jquery search for string in text 
Javascript :: javascript transitionduration 
Javascript :: test undefined js 
Javascript :: javascript string contains multiple substrings 
Javascript :: speedtest-net node.js 
Javascript :: javascript round date to nearest 15 minutes 
Javascript :: replace double slash with single slash node.js 
Javascript :: react multiple event handlers] 
Javascript :: js classlist 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =