Date.parse()是不能精确到毫秒的,只能精确到秒,所以连续点击很快的话比较时间就会出问题
能生成到毫秒的方法:
+new Date()
new Date().getTime()
Date.UTC()
new Date().valueOf()
Date.parse()是不能精确到毫秒的,只能精确到秒,所以连续点击很快的话比较时间就会出问题
能生成到毫秒的方法:
+new Date()
new Date().getTime()
Date.UTC()
new Date().valueOf()