How to get time in milliseconds since the unix epoch in Javascript?

Possible Duplicate:
How do you get a timestamp in JavaScript?
Calculating milliseconds from epoch

How can I get the current epoch time in Javascript? Basically the number of milliseconds since midnight, 1970-01-01.


var milliseconds = (new Date).getTime();

new Date().valueOf() will do the trick. )

链接地址: http://www.djcxy.com/p/13558.html

上一篇: 用python time.time()获取时间

下一篇: 如何获得自从JavaScript中的unix时代以毫秒为单位的时间?