JS根据年月获得当月天数的实现代码
摘要:functiongetDaysInMonth(year,month){month=parseInt(month,10);//parseInt...
function getDaysInMonth(year,month){ month = parseInt(month,10); //parseInt(number,type)这个函数后面如果不跟第2个参数来表示进制的话,默认是10进制。 var temp = new Date(year,month,0); return temp.getDate(); }
【JS根据年月获得当月天数的实现代码】相关文章:
★ JavaScript深度复制(deep clone)的实现方法