Easy Tutorial
❮ Met Canvas Beziercurveto Jsref Valueof Array ❯

timeStamp Event Property


Definition and Usage

The timeStamp event property returns a timestamp, indicating the date and time when the event occurred (in milliseconds since the epoch).

The epoch is a reference point for events. Here, it is the time when the client started.

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

Syntax


Example

Example

The following example retrieves the timestamp since the system started:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tutorialpro.org(tutorialpro.org)</title>
<script>
function myFunction(e){
    alert(e.timeStamp);
}
</script>
</head>
<body>

<p onclick="myFunction(event)">Click this paragraph. An alert box will appear with the timestamp.</p>

</body>
</html>

❮ Met Canvas Beziercurveto Jsref Valueof Array ❯