javascript 中new Date().toLocaleString()在不同浏览器中的结果不一致的解决方法

版权声明:本文为博主原创文章,欢迎转载,转载请注明作者、原文超链接 https://blog.csdn.net/qq_40109752/article/details/83304725

Date.prototype.toLocaleString = function () {
return this.getFullYear()+’-’+(this.getMonth()+1)+’-’+this.getDate()+’ &nbsp’+this.getHours()+’:’+this.getMinutes()+’:’+this.getSeconds()
};

猜你喜欢

转载自blog.csdn.net/qq_40109752/article/details/83304725