為什么月份不對呀 顯示是六月
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>獲得年份 </title>
<script type="text/javascript">
var mydate=new Date();
document.write("年份:"+mydate.getFullYear()+"<br/>");
document.write("月份:"+mydate.getMonth()+"<br/>");
document.write("日期:"+mydate.getDay()+"<br/>");
document.write("時:"+mydate.getHours()+"<br/>");
document.write("分:"+mydate.getMinutes()+"<br/>");
document.write("秒:"+mydate.getSeconds());
</script>
</head>
<body>
</body>
</html>
2015-07-06
月份的范圍在0-11,顯示5其實是6月