字符串形如:2016-06-20 10:41 转换为时间戳:
var date = "2016-06-20 10:41"; date = date.substring(0,19); date = date.replace(/-/g,"/"); var timestamp = new Date(date).getTime(); console.log(timestamp/1000)