用这个方法会提示 ‘month’ is constant.正确用法:用let定义一个变量const date = new Date();const d = date.toLocaleDateString()// console.log(d)const data = new Date();const year = data.getFullYear();const month = data.getMonth() + 1; // 记得当前月是要+1的const dt = data.getDate.
js
2023-12-08
61 点赞
0 评论
92 浏览