Home >Web Front-end >JS Tutorial >Solution to js focus not working (mainly because the dom element is loaded)_javascript skills
There is a text box with an id of d. Use the following js code to get it focused.
document.getElementById("d").focus();
The resulting code does not work in IE. To get focus in IE, you need to use code similar to the following: