2016-07-30 19 views

回答

0
function _getDates(year,month) { 
    return new Date(year, month, 0).getDate(); // 0 + number of days 
} 

console.log(_getDates(2016,07)) 

JSFIDDLE

+0

我用 https://jsfiddle.net/mf543zh6/ 它不運行,雖然 –

相關問題