var nowDate = new Date();
nowDate.setMonth(nowDate.getMonth() + 1);
let lastDay = nowDate.setDate(0);
console.log('最后一天:' + new Date(lastDay).toLocaleString());
js:当月最后一天
最新推荐文章于 2023-08-01 16:53:21 发布
var nowDate = new Date();
nowDate.setMonth(nowDate.getMonth() + 1);
let lastDay = nowDate.setDate(0);
console.log('最后一天:' + new Date(lastDay).toLocaleString());