摘要:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Document</title></head><body> <script>&
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
var myday=new Date()
document.write(myday)
document.write("<br />")
document.write(myday.getFullYear()+"年")
document.write(myday.getMonth()+1+"月")
document.write(myday.getDate()+"日")
document.write("<br />")
var month=new Array(12)
var days=new Array(7)
days[0]="日"
days[1]="一"
days[2]="二"
days[3]="三"
days[4]="四"
days[5]="五"
days[6]="六"
document.write("星期"+days[myday.getDay()])
document.write("<br />")
document.write("今天是这个月的第"+myday.getDate()+"天")
document.write("<br />")
document.write("现在时间是"+myday.getHours()+"点")
document.write(myday.getMinutes()+"分")
document.write(myday.getSeconds()+"秒")
</script>
</body>
</html>
批改老师:天蓬老师批改时间:2018-11-21 09:09:52
老师总结:这么多的document.write,真的好吗?下次试着全部输出到控制台查看吧,信息更丰富