来吧大神帮忙看一下,为什么无论写几都返回defaule
如题,我查了问答说返回来是字符串,给值加上双引号就可以了,可是依然没效果
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>switch</title>
<script type="text/JavaScript">
function aa(){
var myweek=prompt("今天星期几");//myweek表示星期几变量
switch(myweek)
{
case "1":
case "2":
aa="加油"
document.write("学习理念知识:"+aa);
break;
case "3":
case "4":
document.write("到企业实践");
break;
case "5":
document.write("总结经验");
break;
case "6":
case "7":
document.write("周六、日休息和娱乐");
default:
document.write("没有你选择的答案")
}}
aa()
</script>
</head>
<body>
</body>
</html>