返回 Date 對象中用全球標準時間 (UTC) 表示的毫秒值。
dateObj.getUTCMilliseconds()
必選項 dateObj 參數(shù)為 Date 對象。
要獲取用本地時間表示的毫秒數(shù),請使用 getMilliseconds 方法。
返回的毫秒值的范圍是 0-999。
下面這個例子說明了 getUTCMilliseconds 方法的用法。
function UTCTimeDemo(){ var d, s = "當前全球標準時間 (UTC) 是: "; var c = ":"; d = new Date(); s += d.getUTCHours() + c; s += d.getUTCMinutes() + c; s += d.getUTCSeconds() + c; s += d.getUTCMilliseconds(); return(s); }
Date 對象的方法 | getMilliseconds 方法 | setMilliseconds 方法 | setUTCMilliseconds 方法
應(yīng)用于: Date 對象