var date = new Date();console.log('year:',date.getFullYear());//年console.log('month:',date.getMonth()+1);//月console.log('day:',date.getDate());//日
js 获取当前日期
最新推荐文章于 2025-06-03 16:05:30 发布
var date = new Date();console.log('year:',date.getFullYear());//年console.log('month:',date.getMonth()+1);//月console.log('day:',date.getDate());//日