js获取某个月的天数

2018-06-02  本文已影响0人  晨晨晨晨辰

function days(year,month){

        var dayCount;

        now = new Date(year,month, 0);

        dayCount = now.getDate();

        return dayCount;

}

alert(days(2014,7)

上一篇 下一篇

猜你喜欢

热点阅读