HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input Text Object : Find out if a text field automatically gets focus upon page load
The autofocus property sets or returns whether a text field should automatically get focus when the page loads, or not.
This property reflects the HTML autofocus attribute.
Property | |||||
---|---|---|---|---|---|
autofocus | Yes | 10.0 | Yes | Yes | Yes |
Return the autofocus property:
Set the autofocus property:
Value | Description |
---|---|
true|false |
Specifies whether a text field should get focus when the page loads, or not
|
Return Value: | A Boolean, returns true if the text field automatically gets focus when the page loads, otherwise it returns false |
---|
HTML reference: HTML <input> autofocus attribute
❮ Input Text Object