JavaScript——new Date().getMonth()时间:2023-03-09 05:26:16 new Date().getMonth(); 说明:参照现在的月份,getMonth()返回的是0-11的数字,也就是说0=1月,1=2月……11=12月 当前的月份就是,new Date().getMonth()+1;