Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | DOM timeStamp Event Property

Improve Article
Save Article
  • Last Updated : 18 Jan, 2019
Improve Article
Save Article

The timeStamp Event property is used to get the timestamp of when a particular event is created. It basically returns the difference in time (in milliseconds) between the time of event created by the browser and January 1, 1970.

It is a read-only property.



Return Value: : This event returns the number of milliseconds since January 1, 1970 and when the event is triggered.


<!DOCTYPE html>
        <title>DOM timeStamp Event Property</title>
    <body onwheel="Geeks(event)" 
        <h1 style="color: green;">
        <h2>DOM timeStamp Event Property</h2>
        <p onclick="Geeks(event)">
            The click event occurred 
            <span id = "s" style="color:green">
            milliseconds after January 1, 1970.
            function Geeks(event) {
                var doc = event.timeStamp;
                document.getElementById("s").innerHTML = doc;

Before clicking the paragraph:
After clicking the paragraph:
Supported Browsers: The browser supported by timeStamp Event property are listed below:

  • Apple Safari
  • Google Chrome
  • Firefox
  • Opera
  • Internet Explorer 9.0

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!