JavaScript——new Date().getMonth()

new Date().getMonth();

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

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

原文地址:https://www.cnblogs.com/morven/p/3246220.html