function mGetDate(year, month){
var d = new Date(year, month, 0);
return d.getDate();
}
可以添加月份的判斷month需要輸入1-12只能的數(shù)字,輸入其他數(shù)字返回錯(cuò)誤。
function mGetDate(year, month){
var d = new Date(year, month, 0);
return d.getDate();
}
可以添加月份的判斷month需要輸入1-12只能的數(shù)字,輸入其他數(shù)字返回錯(cuò)誤。