Prop Input Time Autofocus
# HTML DOM Input Time autofocus Property
[ Input Time Object](#)
## Example
Check if the time field automatically gets focus after the page loads:
```javascript
var x = document.getElementById("myTime").autofocus;
The output of _x_ is:
true
[Try it yourself Β»](#)
* * *
## Definition and Usage
The autofocus property sets or returns whether a time field should automatically get focus when the page loads.
The property reflects the HTML autofocus attribute.
* * *
## Browser Support

The autofocus property is supported in all major browsers.
**Note:** Internet Explorer 9 and earlier IE versions or Opera 12 and earlier Opera versions do not support the autofocus property.
**Note:** Internet Explorer or Firefox browsers do not support the HTML element with the type="time" attribute.
* * *
## Syntax
Return the autofocus property:
_timeObject_.autofocus
Set the autofocus property:
_timeObject_.autofocus=true|false
## Property Values
| Value | Description |
| --- | --- |
| true|false | Specifies whether the time field should get focus when the page loads * true - The time field gets focus * false - Default. The time field does not get focus |
## Technical Details
| Return Value: | A Boolean. Returns true if the time field automatically gets focus after the page loads, otherwise false. |
| --- |
* * *
## Related Pages
HTML Reference: (#)
* * Input Time Object](#)
YouTip