jQuery event.timeStampProperty

jQuery 事件方法jQuery Event Methods

Example

Return the number of milliseconds elapsed from the first press of the left mouse button to the last release:

$("button").click(function(event){ $("span").text(event.timeStamp); });

Try it Yourself »

Definition and Usage

The event.timeStamp property returns the number of milliseconds elapsed from the first press of the left mouse button to the last release.


Syntax

event.timeStamp

Parameter Description
event Required.eventThe parameter comes from the event binding function.


实例

More Examples

Display the number of milliseconds since the last click event
Shows how to use event.timeStamp to display the number of milliseconds since the last click event.


jQuery 事件方法jQuery Event Methods

Other Extensions