代码如下: function getmonths(dateday){ /*获取当前日期的月份*/ var curDate = new Date(dateday); return curDate.getMonth()+1; }; function getYears(dateday){ /*获取当前日期的年份*/ var curDate = new Date(dateday); return curDate.getFullYear(); }; function getCountDays(dateda