
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML DOM Input Week step Property
The HTML DOM Input Week step property determines the legal intervals for only weeks.
Syntax
Following is the syntax −
- Returning number value
inputWeekObject.step
- Setting step attribute to a number value
inputWeekObject.step = number
Parameters
Parameter number values −
weeks | all values are legal values as long as it is a positive integer |
Example
Let us see an example for Input Week step property −
<!DOCTYPE html> <html> <head> <title>Input Week step</title> <style> form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } </style> </head> <body> <form> <fieldset> <legend>Week-step</legend> <label for="WeekSelect">Week and Year : <input type="week" id="WeekSelect"> </label> <input type="button" onclick="changeStep('2')" value="Step Weeks by 2"> <input type="button" onclick="changeStep('3')" value="Step Weeks by 3"> <div id="divDisplay"></div> </fieldset> </form> <script> var divDisplay = document.getElementById("divDisplay"); var inputWeek = document.getElementById("WeekSelect"); function changeStep(myStep) { inputWeek.step = myStep; divDisplay.textContent = 'Weeks step: '+inputWeek.step; } </script> </body> </html>
Output
This will produce the following output −
Clicking “Step Weeks by 3” button −
Clicking “Step Weeks by 3” button and opening calender −
- Related Articles
- HTML DOM Input Month step Property
- HTML DOM Input Number step Property
- HTML DOM Input Range step property
- HTML DOM Input Date step Property
- HTML DOM Input DatetimeLocal step Property
- HTML DOM Input Time step Property
- HTML DOM Input Week autofocus Property
- HTML DOM Input Week defaultValue Property
- HTML DOM Input Week disabled Property
- HTML DOM Input Week form Property
- HTML DOM Input Week max Property
- HTML DOM Input Week min Property
- HTML DOM Input Week name Property
- HTML DOM Input Week readOnly Property
- HTML DOM Input Week required Property

Advertisements