标签:
var time= (new Date("2015/03/30 12:00:00")).getTime(); //得到毫秒数
//下面格式的时间需要转换:
var time = ‘2015-03-30 12:00:00‘;
time = time .replace(new RegExp("-","gm"),"/");
var times = (new Date(time )).getTime(); //得到毫秒数
//毫秒数转化为时间
var time = (new Date("2015/03/30 12:00:00")).getTime(); //得到毫秒数
var newTime = new Date(time ); //就得到普通的时间了
标签:
原文地址:http://my.oschina.net/jack088/blog/393697