jQueryevent.timeStampプロパティ_

❮jQueryイベントメソッド

ボタンのクリックイベントが発生した1970年1月1日からのミリ秒数を返します。

$("button").click(function(event){
  $("span").text(event.timeStamp);
});

定義と使用法

event.timeStampプロパティは、イベントがトリガーされた1970年1月1日からのミリ秒数を返します。


構文

event.timeStamp

Parameter Description
event Required. The event parameter comes from the event binding function

その他の例


ミリ秒数を表示するevent.timeStampを使用して、ラストクリックイベントからのミリ秒数を表示する方法を示します。


❮jQueryイベントメソッド