Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | DOM timeStamp Event Property

  • Last Updated : 18 Jan, 2019

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.

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.



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
Recommended Articles
Page :

Start Your Coding Journey Now!