abstrait:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title></title></head><body></body><script type="text/javascript"> va
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
<script type="text/javascript">
var myday=new Date()
document.write(myday+"<br>")
document.write(myday.getFullYear()+"年")
document.write(myday.getMonth()+"月")
document.write("<br>")
var month=new Array(12)
month[0]="一月"
month[1]="二月"
month[2]="三月"
month[3]="四月"
month[4]="五月"
month[5]="六月"
month[6]="七月"
month[7]="八月"
month[8]="九月"
month[9]="十月"
month[10]="十一月"
month[11]="十二月"
document.write("這個月是"+month[myday.getMonth()])
document.write("今天是星期"+myday.getDay())
document.write("<br>")
document.write("現(xiàn)在是"+myday.getHours()+"時")
document.write(myday.getMinutes()+"分")
document.write(myday.getSenconds()+"分")
</script>
</html>
Professeur correcteur:天蓬老師Temps de correction:2019-03-05 13:27:04
Résumé du professeur:Date()是javascript中的原生標(biāo)準(zhǔn)類庫, 提供了大量的有關(guān)時間的方法, 在開發(fā)過程中, 時間一直在一個容易出錯錯誤,但又容易被開發(fā)者忽視的問題