Answers for "check if an input element has focus"

0

check if an input element has focus

const el = document.querySelector('.username');
console.log(el === document.activeElement);Code language: JavaScript (javascript)
Posted by: Guest on September-17-2021

Code answers related to "check if an input element has focus"

Code answers related to "Javascript"

Browse Popular Code Answers by Language