js中怎么获取当前年份、月份和日期JS有自带的日期函数,获取如下:var date = new Date()var year = date.getFullYear()获取年份var month = date.getMonth()+1获取月份,因为是从0-11所以要+2023-02-21JavaScript180