使用js的三元表达式: month = (date.getMonth() + 1) > 9 ? date.getMonth() + 1 : "0" + (date.getMonth() + 1);
js 解决月份
最新推荐文章于 2024-03-06 14:50:48 发布
使用js的三元表达式: month = (date.getMonth() + 1) > 9 ? date.getMonth() + 1 : "0" + (date.getMonth() + 1);