例
返回的毫秒數自1970年1月1日,當點擊事件的按鈕時發生:
$("button").click(function(event){
$("span").text(event.timeStamp);
});
試一試» 定義和用法
該event.timeStamp自1970年1月1日,當觸發事件屬性返回的毫秒數。
句法
event.timeStamp
參數 | 描述 |
---|---|
event | 需要。 事件參數來自事件綁定功能 |

更多示例
顯示的毫秒數從去年的單擊事件
展示如何使用event.timeStamp自去年click事件顯示的毫秒數。