函数结合switch怎么实现不了
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>switch</title>
<script type="text/JavaScript">
function my()
{var myweek =document.getElementById("con").value;//myweek表示星期几变量
switch(myweek)
{
case 1:
case 2:
alert("学习理念知识");
break;
case 3:
case 4:
alert("到企业实践");
break;
case 5:
alert("总结经验");
break
default
alert("周六、日休息和娱乐");
}
}
</script>
</head>
<body>周计划
<input type="txt" id="con">
<input type="button" value="点击" onclick="my()">
</body>
</html>