首页
软件开发
登录
6mi
u
盘
搜
搜 索
软件开发
日期格式
日期格式
xiaoxiao
2023-10-13
184
toLocaleString()函数用于以字符串的形式返回当前Date对象 Date.prototype.toLocaleString = function() { return this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + this.getDate(); };
使用 new Date().toLocaleString() 得到如下图 或者 new Date(时间戳).toLocaleString() 得到
转载请注明原文地址: https://yun.8miu.com/read-108386.html
最新回复
(
0
)