How to use JQuery Event timeStamp Property
This article describe about jQuery Event timeStamp Property.
jQuery Event timeStamp Property
Since January 1, 1970 this property contain the number of milliseconds, when the event is triggered.
Syntax
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
Note: After click on the button output become
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