200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > js获取当前时间的年月日时分秒

js获取当前时间的年月日时分秒

时间:2019-10-30 09:01:23

相关推荐

js获取当前时间的年月日时分秒

let time = new Date();let timeInfo =(time.getFullYear()+'年'+time.getMonth()+'月'+time.getDate()+'日'+time.getHours()+':'+time.getMinutes()+':'+time.getSeconds())console.log(timeInfo);

let time = new Date();// 获取年time.getFullYear()'年'// 获取月time.getMonth()'月'// 获取日time.getDate()'日'// 获取时time.getHours()// 获取分time.getMinutes()// 获取秒time.getSeconds()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。