+ 1
How we can force "autofocus" attribute when ajax loading?
When we load a form with input and has an autofocus attribute assigned, the browser can't execute the autofocus. So how we can force the autofocus when the form html is loaded by ajax call?
1 Odpowiedź
+ 10
document.getElementsByTagName("input")[0].focus();