English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
getUTCMilliseconds()Returns the milliseconds of a specific date object based on UTC (0-999)
getUTCMilliseconds()The returned value is from 0 to999The number between
Coordinated Universal Time (UTC) is the time standard set for world time.
date.getUTCMilliseconds()
var d = new Date(); d.getUTCMilliseconds();Test and see‹/›
All browsers fully support the getUTCMilliseconds() method:
Method | |||||
getUTCMilliseconds() | Is | Is | Is | Is | Is |
Return value: | Between 0 and999The integer between them, representing milliseconds |
---|---|
JavaScript Version: | ECMAScript 1 |
Return the milliseconds for a specific date and time:
var d = new Date(#39;August 20, 1999 23:15:30:420'); d.getUTCMilliseconds();Test and see‹/›
Display the time using the getUTCHours(), getUTCMinutes(), getUTCSeconds(), and getUTCMilliseconds() methods:
setInterval(function () { var d = new Date(); var x = document.getElementById('result'); x.innerHTML = d.getUTCHours() + :" + d.getUTCMinutes() + :" + d.getUTCSeconds() + ':' + d.getUTCMilliseconds(); }, 1);Test and see‹/›