This article describes the usage of Javascript milliseconds. Share it for your reference. The details are as follows:
The number of milliseconds is the number of milliseconds between the specified date and time from midnight on January 1, 1970 (GMT time).
1. The number of milliseconds of the current system time
var myData = new Date(); var times = myData.getTime();//The number of milliseconds of the current time
2. The number of milliseconds for the specified time
var time = "2014-02-27 11:50:21"; var times = Date.parse(new Date(time.replace(/-/g, "/")));//Specify the number of milliseconds of the specified time
I hope this article will be helpful to everyone's JavaScript programming.