夜尽天明ht
2016-04-18 21:44
请大神看看,怎么没反应
default那是冒号不是分号
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>switch</title>
<script type="text/JavaScript">
var myweek =4;//myweek表示星期几变量
switch(myweek)
{
case 0;
case 1:
case 2:
degree="学习理念知识"
document.write("计划:"+degree+"<br>");
break;
case 3:
case 4:
degree="到企业实践"
document.write("计划:"+degree+"<br>");
break;
case 5:
degree="总结经验"
document.write("计划:"+degree+"<br>");
case 6:
case 7:
degree="休息和娱乐"
document.write("计划:"+degree+"<br>");
break;
default;
}
</script>
</head>
<body>
</body>
</html>
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题