标签:
function timestamp(time){
var date = new Date(time); //传个时间戳过去就可以了
Y = date.getFullYear() + ‘-‘;
M = (date.getMonth()+1 < 10 ? ‘0‘+(date.getMonth()+1) : date.getMonth()+1) + ‘-‘;
D = date.getDate() + ‘ ‘;
return Y+M+D; //2014-04-23 18:55:49:123
}
标签:
原文地址:http://www.cnblogs.com/runningding/p/5906271.html