- 1

forms autofocus

i really need to understand how the desired input is focus and how it can focus. and why is it necessary to use autofocus?

27th Apr 2020, 1:18 AM
Mawien Manyuat Mawien
2 Antworten
+ 2
I think it is already explained in the lesson itself. So, do not put these type of quetions here.
27th Apr 2020, 2:40 AM
Tarun Kumar
Tarun Kumar - avatar
+ 1
It's not mandatory to use autofocus... It's just a convenient way to determine wich form element got focus at page load: a textinput if you want let the user enter text without having to select the field, a button if you want let the user activate it just by a enter key press... As you could define if a check box is initialy checked or not, or a select option list pre-selected (but conversely, autofocus is mandatory to be set to only one form element by page (not two elements could have the focus has the same time), unless the user overides it by its actions.
27th Apr 2020, 4:11 AM
visph
visph - avatar