为什么输入后提示都的是default的值啊?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <!DOCTYPE HTML> < html > < head > < meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" /> < title >switch</ title > < script type = "text/JavaScript" > function day(){ var myweek =prompt("what day is it today?","1"); 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("周六、日休息和娱乐"); break; default:alert("input error!");} } </ script > </ head > < body > < input type = "button" value = "click here!" onClick = "day()" > </ body > </ html > |