您的位置:首页 > Web前端 > JavaScript

js 毫秒转换为标准时间

2017-09-25 11:30 260 查看
function dateForm(time){
var unixTimestamp = new Date( 1477386005*1000 );
commonTime = unixTimestamp.toLocaleString();
}
Date.prototype.toLocaleString = function() {
return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + "/" + this.getHours() + ":" + this.getMinutes() + ":" + this.getSeconds();
};


  new Data(‘毫秒数’)是标准时间,

  new Data().getTime()是把标准时间转换成毫秒数
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: