是不是浏览器解析不了?求解!!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script>
var myweek = prompt("请输入今天是周几?");
switch(myweek)
{
case 1:
case 2:
case 3:
document.write("在家吃饭");
break;
case 4:
document.write("在外面吃饭");
break;
case 5:
document.write("在家吃饭");
break;
case 6:
case 7:
document.write("在外面吃饭");
break;
default:
document.write("请输入正确日期");
}
</script>
</head>
<body>
</body>
</html>
这代码输入1时怎么不执行case1 而执行default语句 输入其他的数值也是执行default