timestamp
UK ['ta?mst?mp] US ['ta?mst?mp]
Timestamp
jquery timeStamp attribute syntax
Function:The timeStamp attribute contains the number of milliseconds from January 1, 1970 to when the event was triggered.
Syntax: event.timeStam
Parameters:
Parameters | Description |
event | Required. Specifies the event that returns this timestamp. The event parameter comes from the event binding function. |
## jquery timeStamp attribute example
<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(e){
$("span").text(e.timeStamp);
});
});
</script>
</head>
<body>
<p>對(duì)下面這個(gè)按鈕的點(diǎn)擊事件發(fā)生在 1970 年 1 月 1 日之后 <span>unknown</span> 毫秒。</p>
<button>Click me</button>
</body>
</html>
Run instance ?Click the "Run instance" button to view the online instance