HTML DOM Input Week autofocus Property
HTML DOM Input Week autofocus Property
-- Learning not just technology, but dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
JavaScript Reference Manual
JavaScript Objects
- JavaScript Array Object
- JavaScript Boolean Object
- JavaScript Date Object
- JavaScript Math Object
- JavaScript Number Object
- JavaScript String Object
- JavaScript RegExp Object
- JavaScript Global Properties/Functions
- JavaScript Operators
- JavaScript Error
Browser Objects
DOM Objects
- HTML DOM Document Object
- HTML DOM Element Object
- HTML DOM Attribute Object
- HTML DOM Event Object
- HTML DOM Console Object
- CSSStyleDeclaration Object
- DOM HTMLCollection
HTML Objects
- <a>
- <area>
- <audio>
- <base>
- <blockquote>
- <body>
- <button>
- <canvas>
- <col>
- <colgroup>
- <datalist>
- <del>
- <details>
- <dialog>
- <embed>
- <fieldset>
- <form>
- <iframe>
- <frameset>
- <img>
- <ins>
- <input> - button
- <input> - checkbox
- <input> - color
- <input> - date
- <input> - datetime
- <input> - datetime-local
- <input> - email
- <input> - file
- <input> - hidden
- <input> - image
- <input> - month
- <input> - number
- <input> - range
- <input> - password
- <input> - radio
- <input> - reset
- <input> - search
- <input> - submit
- <input> - text
- <input> - time
- <input> - url
- <input> - week
- <keygen>
- <link>
- <label>
- <legend>
- <li>
- <map>
- <menu>
- <menuItem>
- <meta>
- <meter>
- <object>
- <ol>
- <optgroup>
- <option>
- <param>
- <progress>
- <q>
- <script>
- <select>
- <source>
- <style>
- <table>
- <td>
- <th>
- <tr>
- <textarea>
- <title>
- <time>
- <track>
- <video>
Deep Dive
- Web Service
- Network Service
- Software
- Script
- Web Design and Development
- Scripting Language
- Programming
- Computer Science
- Development Tools
- Programming Language
Input Week autofocus Property
Example
Check if the week field automatically gets focus after the page loads:
var x = document.getElementById("myWeek").autofocus;
x output result is:
true
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
All major browsers support the autofocus property.
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 <input type="week"> 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.
|
Technical Details
| Return Value: | A boolean value. Returns true if the week field automatically gets focus when the page loads, otherwise returns false. |
|---|
Related Pages
HTML Reference Manual: HTML <input> autofocus Attribute
YouTip