Prop Week Autofocus
# Input Week autofocus Property
[ Input Week Object](#)
## Example
Check if the week field automatically gets focus after the page loads:
var x = document.getElementById("myWeek").autofocus;
The output of _x_ is:
true
[Try it Β»](#)
* * *
## Definition and Usage
The autofocus property is used to set or return whether the week field should automatically get focus when the page loads.
This property reflects the HTML autofocus attribute.
* * *
## Browser Support

The autofocus property is supported by 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 element.
* * *
## Syntax
Return the autofocus property:
_weekObject_.autofocus
Set the autofocus property:
_weekObject_.autofocus=true|false
## Property Values
| Value | Description |
| --- | --- |
| true|false | Specifies whether the week field should get focus when the page loads * true - The week field gets focus * false - Default. The week field does not get focus |
## Technical Details
| Return Value: | A Boolean. Returns true if the week field automatically gets focus when the page loads, otherwise false. |
| --- |
* * *
## Related Pages
HTML Reference: (#)
* * Input Week Object](#)
YouTip