Javascript examples for DOM HTML Element:Input Time
The stepDown() method decrements the MINUTES of the time field by a specified number.
Parameter | Description |
---|---|
number | Required. amount of minutes the time field should decrease. |
If omitted, the minutes are decremented by "1"
No return value
The following code shows how to Decrement the value of a time field by 1 minute:
<!DOCTYPE html> <html> <body> Time: <input type="time" id="myTime" value="16:32:55"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/* ww w . j ava 2s . co m*/ document.getElementById("myTime").stepDown(); } </script> </body> </html>