0
What is the function of 'autofocus' attribute?
on this app the function of 'autofocus' attribut is described briefly. so please explain me more
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.
+ 1
Tanzim Ikram Sheikh you're welcome.
0
make sense. thank you very much 😊