js根据年份获取某月份有几天

1 function getNum(year, month) {
2     var temp;
3     month = parseInt(month, 10);
4     temp = new Date(year, month, 0);
5     return temp.getDate();
6 };
原文地址:https://www.cnblogs.com/951106Nancy/p/9414846.html