共用方式為


getUTCMilliseconds Method (Windows Scripting - JScript)

 

Returns the milliseconds value in a Date object using Universal Coordinated Time (UTC).

Syntax

dateObj.getUTCMilliseconds() 

Remarks

The required dateObj reference is a Date object.

To get the number of milliseconds in local time, use the getMilliseconds method.

The millisecond value returned can range from 0-999.

The following example illustrates the use of the getUTCMilliseconds method.

function UTCTimeDemo(){
   var d, s = "Current Universal Coordinated Time (UTC) is: ";
   var c = ":";
   d = new Date();
   s += d.getUTCHours() + c;
   s += d.getUTCMinutes() + c;
   s += d.getUTCSeconds() + c;
   s += d.getUTCMilliseconds();
   return(s);
}

Requirements

Version 3

Applies To: Date Object (Windows Scripting - JScript)

See Also

getMilliseconds Method (Windows Scripting - JScript)
setMilliseconds Method (Windows Scripting - JScript)
setUTCMilliseconds Method (Windows Scripting - JScript)