先重写Dated的toLocaleString方法:
Date.prototype.toLocaleString = function() { return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + "/ " + this.getHours() + ":" + this.getMinutes() + ":" + this.getSeconds(); };
假设时间毫米数是10000,
var time = new Date(10000); timeStr = time.toLocaleString();
参考网址:
http://www.cnblogs.com/zhanghaoliang/p/5997619.html
http://blog.csdn.net/bangrenzhuce/article/details/53022894