Date.prototype.getUTCMilliseconds()
Date 实例的 getUTCMilliseconds() 方法根据世界时间返回该日期的毫秒数。
¥The getUTCMilliseconds() method of Date instances returns the milliseconds for this date according to universal time.
Try it
语法
参数
返回值
¥Return value
0 到 999 之间的整数,表示根据通用时间给定日期的毫秒数。如果日期是 invalid,则返回 NaN。
¥An integer, between 0 and 999, representing the milliseconds for the given date according to universal time. Returns NaN if the date is invalid.
不要与时间戳混淆。要获取自纪元以来的总毫秒数,请使用 getTime() 方法。
¥Not to be confused with the timestamp. To get the total milliseconds since the epoch, use the getTime() method.
示例
使用 getUTCMilliseconds()
规范
| Specification |
|---|
| ECMAScript Language Specification # sec-date.prototype.getutcmilliseconds |
浏览器兼容性
BCD tables only load in the browser