Example

Show the timestamp for when the click event occurred for a button element:

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

Try it yourself »

Definition and Usage

The timeStamp property contains the number of milliseconds since January 1 1970, for when the event is triggered.

Syntax

event.timeStamp

Parameter Description
event Required. Specifies the event to get the timestamp for. The event parameter comes from the event binding function