// 获取某个时间格式的时间戳
var stringTime = "2014-07-10 10:21:12";
var timestamp1 = stringTime.replace(/-/g,'/');
var timestamp2 = new Date(timestamp1).getTime();
alert(stringTime + "的时间戳为:" + timestamp2);
var stringTime = "2014-07-10 10:21:12";
var timestamp1 = stringTime.replace(/-/g,'/');
var timestamp2 = new Date(timestamp1).getTime();
alert(stringTime + "的时间戳为:" + timestamp2);