<script>
//当前时间
let n1 = new Date();
console.log(n1)
//2021年 九月 八日 六时六分六秒
let n2 = new Date('2021/9/8 6:6:6')
console.log(n2)
//2021年 10月 5日 6时 6分 6秒
let n3 = new Date(2021, 10, 05, 6, 6, 6)
console.log(n3)
</script>
WebAPI DOM操作文档-时间日期对象的创建
最新推荐文章于 2024-10-15 09:57:04 发布