var days = shijiancha / 1000 / 60 / 60 / 24;
var daysRound = Math.floor(days);
var hours = shijiancha/ 1000 / 60 / 60 - (24 * daysRound);
var hoursRound = Math.floor(hours);
var minutes = shijiancha / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
var minutesRound = Math.floor(minutes);
var seconds = shijiancha/ 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
js 中把毫秒数转化成返贺具体时间如下:
var oDate = new Date();
var iM = oDate.getTime(); 漏芦派 //得到毫秒数
var nDate = new Date(iM0; //直接将毫秒数当参数传进去。
alert(nDate); //这个时候弹出的就是具体的“星期”哗培、”月“、”日“、”年“的格式。