I\'m trying to set the default focus on an input box when the page loads (example: google). My page is very simple, yet I can\'t figure out how to do this.
This is w
This is one of the common issues with IE and fix for this is simple. Add .focus() twice to the input.
Fix :-
function FocusOnInput() {
var element = document.getElementById('txtContactMobileNo');
element.focus();
setTimeout(function () { element.focus(); }, 1);
}
And call FocusOnInput() on $(document).ready(function () {.....};