Answers for "check element focus javascript"

5

javascript test if element has focus

var myElement = document.getElementById('myID');
if(myElement === document.activeElement){
    //myElement Has Focus
}
Posted by: Guest on August-01-2019
0

Javascript find element with focus

var currentElementWithFocus=document.activeElement;
Posted by: Guest on July-23-2019

Code answers related to "check element focus javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language