A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/Event/timeStamp below:

timeStamp ยท WebPlatform Docs

timeStamp Summary

Gets the time, in milliseconds, when an event occurred.

Property of dom/Eventdom/Event

Syntax

Note: This property is read-only.

var eventTimestamp = event.timeStamp;
Return Value

Returns an object of type NumberNumber

The event time stamp, in milliseconds since 1970-1-1 00:00:00 UTC.

Examples

The following event handler displays the event time by using the current locale settings.

function eventHandler(evt) {
    var dt = new Date(evt.timeStamp);
    alert(dt.toLocaleString());
}
window.onload = eventHandler;
Related specifications
DOM Level 3 Events
Working Draft
See also Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4