月份与日期都不对,只有年份是对的
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>定时器</title>
<script type="text/javascript">
var attime;
function clock(){
var time=new Date();
num=time.getDay();
weekend=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
attime=time.getFullYear()+"年"+time.getMonth()+"月"+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds() +weekend[num];
document.getElementById("clock").value = attime;
}
var int=setInterval(clock,1000);
</script>
</head>
<body>
<form>
<input type="text" id="clock" size="50" />
</form>
</body>
</html>
为什么显示的月份不对,日期也不对只有年份是对的