<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>javascript日期</title>
</head>
<body>
<script type="text/javascript">
var myday=new Date()
//document.write(myday)
document.write(myday.getFullYear()+"年" )
var month=new Array(12)
month[0]="01月"
month[1]="02月"
month[2]="03月"
month[3]="04月"
month[4]="05月"
month[5]="06月"
month[6]="07月"
month[7]="08月"
month[8]="09月"
month[9]="10月"
month[10]="11月"
month[11]="12月"
document.write(month[myday.getMonth()])
document.write(myday.getDate()+"日" )
document.write(myday.getHours()+"点" )
document.write(myday.getMinutes()+"分" )
document.write(myday.getSeconds()+"秒" )
</script>
</body>
</html>