var getDaysInMonth = function(year,month){
month = parseInt(month,10); //parseInt(number,type)这个函数后面如果不跟第2个参数来表示进制的话,默认是10进制。
var temp = new Date(year,month,0);
return temp.getDate();
};
根据年月获取当月天数
猜你喜欢
转载自blog.csdn.net/weixin_39717076/article/details/84632860
今日推荐
周排行