function getMonthDays(year, month) {
var tmpList = [];
var endDay = new Date(year, month, 0).getDate();
for (var i = 1; i <= endDay; i++) {
tmpList.push(i < 10 ? "0" + i : i.toString())
}
return tmpList;
}
JS获取指定年月天数
最新推荐文章于 2024-03-06 00:02:48 发布