<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>switch</title>
<script?type="text/JavaScript">
function?week(){????
????var?myweek?=?prompt("查看周幾呢","請輸入1-7之間的數!");
????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>
<input?type="button"?value="點此輸入時間"?onclick="week()">
</body>
</html>
2016-09-13
keyi
2016-06-28
這個問題剛看到有同學提了,已經解決了。