Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

check if an input element has focus

const el = document.querySelector('.username');
console.log(el === document.activeElement);Code language: JavaScript (javascript)
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript object get element by index 
Javascript :: react onclick new tab 
Javascript :: js set get first value 
Javascript :: js reverse str case 
Javascript :: js add params to url 
Javascript :: how to get browser url in javascript 
Javascript :: check if element is last child jquery 
Javascript :: jquery append img to div 
Javascript :: replace non alphanumeric javascript 
Javascript :: outsystems close feedback message 
Javascript :: gmail regex 
Javascript :: javascript absolute import 
Javascript :: jquery sum all input values 
Javascript :: moment js cdn 
Javascript :: onresize js 
Javascript :: debounce in react native hooks 
Javascript :: Make Array Consecutive javascript 
Javascript :: javascript log error without traceback 
Javascript :: npm ERR! command /d /s /c node-pre-gyp install --fallback-to-build 
Javascript :: node js get file name without extension 
Javascript :: js make obj invisible 
Javascript :: stateprovider.js react 
Javascript :: react fontawesome 
Javascript :: make something visible js 
Javascript :: how to square a value in javascript 
Javascript :: Javascript to remove the pressed class after a 100 milliseconds 
Javascript :: js check query string 
Javascript :: javascript only allow show first few characters from a string 
Javascript :: auto comoplete off in vu js 
Javascript :: how to generate package-lock.json from package.json 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =