0

What is the function of 'autofocus' attribute?

on this app the function of 'autofocus' attribut is described briefly. so please explain me more

14th Jun 2018, 8:40 AM
Tanzim Ikram Sheikh
Tanzim Ikram Sheikh - avatar
3 Antworten
+ 2
The autofocus attribute is a boolean attribute. When present, it specifies that the element should automatically get focus when the page loads. Basically when this attribute is present in an input text field, you don't have to actually click on the text field to give it keyboard focus, you can just type away. If you don't understand try using the attribute on an <input /> tag like this: <form> <input type="text" autofocus /> </form> The autofocus attribute can be used on the following elements: <button>...</button>, <input />, <select>...</select>, and <textarea>...</textarea> Hope you find it useful.
14th Jun 2018, 8:47 AM
Ryan
Ryan - avatar
+ 1
Tanzim Ikram Sheikh you're welcome.
14th Jun 2018, 9:06 AM
Ryan
Ryan - avatar
0
make sense. thank you very much 😊
14th Jun 2018, 9:04 AM
Tanzim Ikram Sheikh
Tanzim Ikram Sheikh - avatar