請問哪里錯(cuò)了
<!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();
? var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
??
? var mynum=mydate.getday();?
? document.write("今天是:" +weedday[mynum] );
</script>
</head>
<body>
</body>
</html>
2016-07-14
getDay方法采用駝峰法,從第二個(gè)單詞開始(包括第二個(gè)單詞)首字母要大寫;
weekday[mynum],你把k寫成了d;
2016-07-14
myDate.getDay(); 大寫