getMilliseconds()
メソッドは、ローカル時間に基づき、指定された日時の「ミリ秒」を返します。
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
構文
dateObj.getMilliseconds()
返値
ローカル時間に基づき、指定された日時の「ミリ秒」を表す 0 から 999 までの間の数値。
例
getMilliseconds() の使用
次の例は、現在時刻のミリ秒部を変数 milliseconds
に代入します。
var today = new Date();
var milliseconds = today.getMilliseconds();
仕様書
ブラウザーの互換性
BCD tables only load in the browser