
- 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 Time stepDown( ) Method
The HTML DOM Input Time stepdown() method defines the number of minutes the Time field should decrease.
Syntax
Following is the syntax −
Calling stepDown method with a number, which by default is equal to 1
inputTimeObject.stepDown(number)
Example
Let us see an example of Input Time stepDown method −
<!DOCTYPE html> <html> <head> <title>Input Time stepDown()</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>Time-stepDown( )</legend> <label for="TimeSelect">Clock : <input type="time" id="TimeSelect" value="12:20"> </label> <input type="button" onclick="changeStep(10)" value="Decrease by 10"> <input type="button" onclick="changeStep(25)" value="Decrease by 25"> <div id="divDisplay"></div> </fieldset> </form> <script> var divDisplay = document.getElementById("divDisplay"); var inputTime = document.getElementById("TimeSelect"); function changeStep(myStepDown) { inputTime.stepDown(myStepDown); divDisplay.textContent = 'Current Step: '+myStepDown; } </script> </body> </html>
Output
This will produce the following output −
Before clicking any button −
Clicking ‘Decrease by 10’ button −
Clicking ‘Decrease by 25’ button −
- Related Articles
- HTML DOM Input Week stepDown( ) Method
- HTML DOM Input Range stepDown() method
- HTML DOM Input Month stepDown() Method
- HTML DOM Input Number stepDown() Method
- HTML DOM Input Date stepDown() Method
- HTML DOM Input DatetimeLocal stepDown( ) Method
- HTML DOM Input Time stepUp( ) Method
- HTML DOM Input Time Object
- HTML DOM Input Time type Property
- HTML DOM Input Time value Property
- HTML DOM Input Time autofocus Property
- HTML DOM Input Time defaultValue Property
- HTML DOM Input Time disabled Property
- HTML DOM Input Time form Property
- HTML DOM Input Time max Property

Advertisements