不知道为什么输出不了week?大神来帮我看看
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>系好安全带,准备启航</title>
<script type="text/javascript">
//通过javascript的日期对象来得到当前的日期,并输出。
var day = new Date();
//星期几
var xq = day.getDay();
var week = '';
switch(xq){
case'0':
week = '星期日';
break;
case'1':
week = '星期一';
break;
case'2':
week = '星期二';
break;
case'3':
week = '星期三';
break;
case'4':
week = '星期四';
break;
case'5':
week = '星期五';
break;
case'6':
week = '星期六';
break;
}
document.write(week);
document.write(day.getFullYear()+'年'+(day.getMonth()+1)+'月'+day.getDate()+'日' + week);
</script>
</body>
</html>