ES6 - getUTCMilliseconds() 方法



JavaScript 的 date getUTCMilliseconds() 方法根據世界標準時間返回指定日期的毫秒數。getUTCMilliseconds 返回的值是 0 到 999 之間的整數。

語法

Date.getUTCMilliseconds ()   

返回值

根據世界標準時間返回指定日期的毫秒數。

示例

var dt = new Date( "December 25, 1995 23:15:20" ); 
console.log("getUTCMilliseconds() : " + dt.getUTCMilliseconds())   

輸出

getUTCMilliseconds() : 0    
廣告

© . All rights reserved.