<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>switch</title><script type="text/JavaScript">function liang(){var myweek =document.getElementById("bian").value;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 7:?document.write("周六、日休息和娛樂");?break;?default:?document.write("輸入出錯");}}</script></head><body><input id="bian" type="text" name="grade" ><br><input type="button" value="點(diǎn)吧" onclick="liang()"></body></html>為什么框里寫什么,都是顯示錯誤。
初學(xué)者js的問題
芝士君
2016-02-02 21:12:37