Js中怎么获取当前年份、月份和日期?
小天
小天 2016-12-20 15:20:28
0
2
958
小天
小天

勇敢站起来快步向前冲是你唯一的出路

reply all(2)
数据分析师

How to get the current year, month and date in Js? - PHP Chinese website Q&A - How to get the current year, month and date in Js? - PHP Chinese website Q&A

Take a look around and learn.

迷茫

var myDate = new Date( );

myDate.getFullYear(); //获取完整的年份(4位,1970-????)

myDate.getMonth(); //获取当前月份(0-11,0代表1月)

myDate.getDate(); //获取当前日(1-31)


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!