I have form with two text fields and onLoad="document.forms.obrazac.sifra.focus()" I put cursor on the first field. Now I want when user press enter key to focus cursor on second field and then when enter is pressed again I want to submit my form.
How can I do that, thanks.
I have form with two text fields and onLoad=document.forms.obrazac.sifra.focus() I put cursor on the
Share
It’s definitely not good to break the default behavior. Btw, do you know the
autofocusattribute in HTML?If you absolutely need this, here you go: