How to set the focus on a html element ?
I use document.getElementById(\'ID_HTML_wanted\').focus(); but my html element \"ID_HTML_wanted\" as not the f
document.getElementById(\'ID_HTML_wanted\').focus();
Sorry, i have effectively omit to set focus when DOM is ready :
$( document ).ready(function() { $("#ID_HTML_wanted").focus(); });
All three of the following syntaxes of .ready() are equivalent:
$(document).ready(handler) $().ready(handler) (this is not recommended) $(handler)