From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Date Object
The getSeconds() method returns the seconds of a time.
| dateObject.getSeconds() |
Note: The value returned by getSeconds() is a two digit number. However, the return value is not always two digits, if the value is less than 10 it only returns one digit.
Note: This method is always used in conjunction with a Date object.
ExampleGet the seconds of the current time:
Try it yourself » |
More Examples |
Display the current time
How to use getHours(), getMinutes(), and getSeconds() to display the current time.
JavaScript Date Object
From http://www.w3schools.com (Copyright Refsnes Data)