--- title: Date.prototype.getMilliseconds() slug: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds tags: - Date - JavaScript - Method - Prototype - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds ---
getMilliseconds()
メソッドは、ローカル時間に基づき、指定された日時の「ミリ秒」を返します。
dateObj.getMilliseconds()
ローカル時間に基づき、指定された日時の「ミリ秒」を表す 0 から 999 までの間の数値。
次の例は、現在時刻のミリ秒部を変数 milliseconds
に代入します。
var today = new Date(); var milliseconds = today.getMilliseconds();
仕様書 |
---|
{{SpecName('ESDraft', '#sec-date.prototype.getmilliseconds', 'Date.prototype.getMilliseconds')}} |
{{Compat("javascript.builtins.Date.getMilliseconds")}}