Date.getUTCMilliseconds()

JavaScript 1.2+, ECMAScript 1.0+, JScript 3.0+ Nav4+, IE 4+ Syntax

							date.getUTCMilliseconds()

Description

The getUTCMilliseconds() method returns the millisecond portion of the date converted to universal time and expressed as an integer from 0 to 999.

Example

The code in Listing 6.85 displays the current millisecond in universal time using the getUTCMilliseconds() method.

Listing 6.85 Using the getUTCMilliseconds() Method to Return the Current Milliseconds
 <html> <script language="JavaScript"> <!-- Hide //Create a Date object that contains the current date and time. theDate = new Date(); //Display the UTC milliseconds document.write("The UTC millisecond is ",theDate.getUTCMilliseconds()); //Hide End --> </script> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.