X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

timeStamp Event Property

Event Object Reference Event Object

Definition and Usage

The timeStamp event property returns the number of in milliseconds since midnight of January 1, 1970.

It can be used as a time stamp of when the event was triggered.

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

Syntax

event.timeStamp
 

Example

Example

The following example gets the timestamp from the system start:

<html>
<head>
<script>
function myFunction(e)
  {
  alert(e.timeStamp);
  }
</script>
</head>

<body>

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

</body>
</html>

Try it yourself »


Event Object Reference Event Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook