function getDays(year, month){ //获取当月的天数 month = parseInt(month,10); var d= new Date(year,month,0); return d.getDate() } console.log(getDays(new Date().getFullYear(),(new Date().getMonth()+1)))
function getDays(year, month){ //获取当月的天数 month = parseInt(month,10); var d= new Date(year,month,0); return d.getDate() } console.log(getDays(new Date().getFullYear(),(new Date().getMonth()+1)))