How to use JQuery Event timeStamp Property

This article describe about jQuery Event timeStamp Property.
  • 2032

jQuery Event timeStamp Property

Since January 1, 1970 this property contain the number of milliseconds, when the event is triggered.

Syntax

event.timeStamp

 

Parameter Description
event Required. It is define the event to get timeStamp for. And event parameter comes from event binding method.

Example

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("button").click(function (e) {

            $("span").text(e.timeStamp);

        });

    });

</script>

</head>

<body>

<p>Click event of the button below <span>unknown</span> milliseconds after January 1, 1970.</p>

<button>Click me</button>

</body>

</html>

Output

timeStamp event pic25.jpg

Note: After click on the button output become

timeStamp pic26.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.