例
返回的毫秒数自1970年1月1日,当点击事件的按钮时发生:
$("button").click(function(event){
$("span").text(event.timeStamp);
});
试一试» 定义和用法
该event.timeStamp自1970年1月1日,当触发事件属性返回的毫秒数。
句法
event.timeStamp
参数 | 描述 |
---|---|
event | 需要。 事件参数来自事件绑定功能 |

更多示例
显示的毫秒数从去年的单击事件
展示如何使用event.timeStamp自去年click事件显示的毫秒数。