timeStamp Event Attribute
Complete Event Object Reference
Definition and Usage
The timeStamp event attribute returns the time stamp, in milliseconds, from
the epoch.
The epoch is a time reference point. In this case it is when the clients
computer started up.
Not all systems provide this information, therefore, timeStamp may be not
available for all systems/events.
Syntax
Example
The following example gets the timestamp from the system start:
<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
box will alert the timestamp.</p>
</body>
</html>
|
Try-It-Yourself Demos
Return
the time since system start in minutes
Complete Event Object Reference
|
|
|