JavaScript获得当前时间的年月日

获得当前时间的年

new Date().getFullYear()

获得当前时间的月

new Date().getMonth() + 1

获得当前时间的日

new Date().getDate()