木畏
2015-04-02 14:30
RT。按照要求完成了呀。还是报错
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>switch</title>
<script type="text/JavaScript">
var myweek =3;//myweek表示星期几变量
switch(myweek)
{
case 1:
case 2:
document.write("学习理念知识");
break;
case 3:
case 4:
document.write("到企业实践");
break;
case 5:
document.write("总结经验");
case 6:
case 7:
document.write("周六、日休息和娱乐");
}
</script>
</head>
<body>
</body>
</html>
switch(myweek)
{
case 1:
case 2:
document.write("学习理念知识");
break;
case 3:
case 4:
document.write("到企业实践");
break;
case 5:
document.write("总结经验");
case 6:
case 7:
document.write("周六、日休息和娱乐");
defalut:
break;
}
请看。
贴下代码
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题