new Date 日期操作方法
**秒创2018-11-27 00:41:52546 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>new Date 日期操作方法</title>
</head>
<body>
<script type="text/javascript">
var myday=new Date();
document.write(myday+"<br>");
document.write(myday.getFullYear()+"年<br>");
var a=myday.getMonth();
document.write(a+1+"月<br>")
var a1=new Array(12)
a1[0]="一月"
a1[1]="二月"
a1[2]="三月"
a1[3]="四月"
a1[4]="五月"
a1[5]="六月"
a1[6]="七月"
a1[7]="八月"
a1[8]="九月"
a1[9]="十月"
a1[10]="十一月"
a1[11]="十二月"
document.write("这个月是"+a1[myday.getMonth()]+"今天是"+myday.getDate()+"号,星期"+myday.getDay()+"现在是"+myday.getHours()+"时"+"<br>");
</script>
</body>
</html>