输出日期不正确
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>获得星期</title>
<script type="text/javascript">
function cot(){
y=document.getElementById("y").value;
m=document.getElementById("m").value;
d=document.getElementById("d").value;
var mydate=new Date(y,m,d);
var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
var myday=mydate.getDay();
document.getElementById("w").value=weekday[myday];
//document.write("今天是:" + weekday[myday]);
}
</script>
</head>
<body>
<form>
<input type="text" id="y">year</br>
<input type="text" id="m">mouth</br>
<input type="text" id="d">day</br>
<input type="button" id="b" value="count" onclick="cot()"></br>
<input type="text" id="w">week</input>
</form>
</body>
</html>