XML DOM timeStamp event attribute

Definition and usage

The timeStamp event property can return a timestamp. It indicates the date and time of the event (in milliseconds from epoch).

Epoch is an event reference point. Here, it is the time when the client starts.

Not all systems provide this information, so the timeStamp property is not available for all systems/events.

Syntax

event.timeStamp

Example

The following example can obtain the event timestamp since the system started:

<html>
<head>
<script type="text/javascript">
function showTimestamp(event)
  {
  var minutes = 1000*60
  x=event.timeStamp;
  alert(x/minutes)
  }
</script>
</head>
<body onmousedown="showTimestamp(event)">
<p>Click in the document. An alert 
the box will alert the timestamp.</p>
</body>
</html>

TIY

timestamp event
Returns the number of minutes since the system started (not supported by IE browser).