输出要注意大多数Date对象是从0开始,所以要+1,下面是个人的输出中国区时间的代码
<script language="JavaScript">
var date = new Date();
document.write(date.getFullYear()+"年"+
(date.getMonth()+1)+"月"+
date.getDate()+"日"+" "+
"周"+date.getDay());
</script>
转载请注明原文地址: https://lol.8miu.com/read-19804.html