Visit Mozilla.org

Core JavaScript 1.5 Reference:Global Objects:Date:getMilliseconds

From MDC


Contents

[edit] Summary

Returns the milliseconds in the specified date according to local time.

Method of Date
Implemented in: JavaScript 1.3
ECMA Version: ECMA-262

[edit] Syntax

getMilliseconds()

[edit] Parameters

None.

[edit] Description

The value returned by getMilliseconds is a number between 0 and 999.

[edit] Examples

[edit] Example: Using getMilliseconds

The following example assigns the milliseconds portion of the current time to the variable ms.

var ms;
Today = new Date();
ms = Today.getMilliseconds(); 

[edit] See Also

getUTCMilliseconds, setMilliseconds