The getMilliseconds()
method returns the milliseconds in the specified date according to local time.
dateObj.getMilliseconds()
None.
The value returned by getMilliseconds()
is a number between 0 and 999.
getMilliseconds()
The following example assigns the milliseconds portion of the current time to the variable milliseconds
:
var today = new Date(); var milliseconds = today.getMilliseconds();
Created by Mozilla Contributors and licensed under CC-BY-SA 2.5