var stringTime = "2014-07-10 10:21:12"; var timestamp2 = Date.parse(new Date(stringTime)); 转载于:https://www.cnblogs.com/yiweiyihang/p/7251346.html