Answers for "make input focus js"

2

set focus on input field javascript

window.onload=function(){
 document.getElementById("id_here").focus();
}
// id_here = put the id of the HTML element where you want to set focus.
Posted by: Guest on April-23-2021
0

focus element javascript

focusMethod = function getFocus() {
  document.getElementById("myTextField").focus();
}
Posted by: Guest on January-24-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language