new Date().getMonth();

说明:参照现在的月份,getMonth()返回的是0-11的数字,也就是说0=1月,1=2月……11=12月

当前的月份就是,new Date().getMonth()+1;

相关文章: