<!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("查看周幾呢","請(qǐng)輸入1-7之間的數(shù)!");
????switch(myweek)
????{?
????case?1:
????case?2:?
????document.write("學(xué)習(xí)理念知識(shí)");
????break;
????case?3:
????case?4:
????document.write("到企業(yè)實(shí)踐");
????break;
????case?5:
????document.write("總結(jié)經(jīng)驗(yàn)");
????break;
????case?6:
????case?7:
????document.write("周六、日休息和娛樂");
????default:
????document.write("出現(xiàn)錯(cuò)誤了哦!");
????}
}
</script>
</head>
<body>
<input?type="button"?value="點(diǎn)此輸入時(shí)間"?onclick="week()">
</body>
</html>
2016-09-13
keyi
2016-06-28
這個(gè)問題剛看到有同學(xué)提了,已經(jīng)解決了。