switch 問題?不懂?
var?myweek?=3;//myweek表示星期幾變量 switch(myweek) { ?case?1: ?case?2: ?document.write("學(xué)習(xí)理念知識"); ?break; ?case?3: ?case?4: ?document.write("到企業(yè)實踐"); ?break; ?case?5: ?document.write("總結(jié)經(jīng)驗"); ?break; case?6: case?0: ?document.write("周六、日休息和娛樂"); ?break; default: document.write("請輸0~6范圍的數(shù)"); } </script>
//為什么輸出不了?求解?
2016-03-20
document.write("請輸0~6范圍的數(shù)"); ? ?這句后面括號)是不是用了中文符號啊。。
2016-03-20
document.write("請輸0~6范圍的數(shù)");這句錯了
2016-03-20
document.write("請輸0~6范圍的數(shù)") ? ? 這句最后一個的括號是中文輸入法下的括號 ??
2016-03-20
或者將【document.write("請輸0~6范圍的數(shù)");】中的“)”換為英文狀態(tài)下輸入“)”
2016-03-20
將【
default:
document.write("請輸0~6范圍的數(shù)");
】
//這段代碼刪除即可
2016-03-20
document.write("請輸0~6范圍的數(shù)");最后一個括號你用了中文的括號。
2016-03-20
最后一行document.write("請輸0~6范圍的數(shù)");你使用了一個中文的反括號。換成英文的括號就可以了
2016-03-20
剛剛那條請忽略
2016-03-20
'1' ?'2' ?'3' ?prompt里面的不是數(shù)字 是字符