哪里出错了呢?为什么每次都是default的结果呢?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>switch</title>
<script type="text/JavaScript">
function aa(){
confirm("请确认日期");
var myweek = prompt("输入日期");
switch(myweek)
{
case 1:
case 2:
document.write("学习理念知识");
break;
case 3:
case 4:
document.write("到企业实践");
break;
case 5:
document.write("总结经验");
break;
case 6:
case 7:
document.write("周六、日休息和娱乐");
default:document.write("啊?你说啥?");//每次运行出来都是这个结果
}}
</script>
</head>
<body>
<form>
<input type="button" value="有本事按我" onclick="aa()">
</form>
</body>
</html>