Javascript examples for DOM HTML Element:Input Time
The stepDown() method increments the MINUTES of the time field by a specified number.
Parameter | Description |
---|---|
number | Required. amount of minutes the time field should increase. |
If omitted, the minutes are incremented by "1"
No return value
The following code shows how to Increment the value of a time field by 10 minutes:
<!DOCTYPE html> <html> <body> Time: <input type="time" id="myTime" value="16:32:55"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/*from w w w. ja va 2s . c o m*/ document.getElementById("myTime").stepUp(10); } </script> </body> </html>