jquery timeStamp attribute


  Translation results:

timestamp

UK ['taɪmstæmp] US ['taɪmstæmp]

Timestamp

jquery timeStamp attributesyntax

Function:The timeStamp attribute contains the number of milliseconds from January 1, 1970 to when the event was triggered.

Syntax: event.timeStam

Parameters:

##

jquery timeStamp attributeexample

<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>对下面这个按钮的点击事件发生在 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

Parameters Description
event Required. Specifies the event that returns this timestamp. The event parameter comes from the event binding function.