日期:2014-05-16 浏览次数:20431 次
var a = Date.parse("Dec 29, 2013, 13:23:33"),
b = Date.parse("Dec 27, 2013, 15:23:54");
alert(a-b)
var a = "2013-12-29 13:23:43";
var b = "2013-12-29 13:23:33";
var date1 = new Date(Date.parse(a.replace(/\-/g, "/")));
var date2 = new Date(Date.parse(b.replace(/\-/g, "/")));
//得出10毫秒
alert(date1.getTime()/1000-date2.getTime()/1000);