function getLastMonthDay( year, month){
var firstdate = year + '-' + month + '-01';
var day = new Date(year,month,0);
var lastdate = year + '-' + month + '-' + day.getDate();//获取当月最后一天日期
alert(lastdate);
return lastdate;
}
getLastMonthDay(2012,02)
var firstdate = year + '-' + month + '-01';
var day = new Date(year,month,0);
var lastdate = year + '-' + month + '-' + day.getDate();//获取当月最后一天日期
alert(lastdate);
return lastdate;
}
getLastMonthDay(2012,02)