以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 Dot NET,C#,ASP,VB 』 (http://bbs.xml.org.cn/list.asp?boardid=43) ---- js的一道习题求教 (http://bbs.xml.org.cn/dispbbs.asp?boardid=43&rootid=&id=24119) |
-- 作者:zhineng28 -- 发布时间:11/10/2005 8:47:00 AM -- js的一道习题求教 下面是我在课本上的一到习题!根据学生的等级评A B C D级。 <script language="javascript"> document.write("<font size='+1'>"); while(true){ var score=eval(prompt("Please input the score:","")); if (score<0 || score>100){ document.writeln("The score should be between 0 to 100!"); continue; } if(score>89 && score<101){ document.writeln("The degree is: A"); } else if (score>79 && score<90){ document.writeln("The degree is: B"); } else if(score>69 && score<80){ document.writeln("The degree is: c"); } else if(score>59 && score<70);{ document.writeln("The degree is: D"); } else { document.writeln("It is bad!"); } answer = prompt("Do you want to input another student?",""); if(answer !="y"){ break; } } document.write("终于可以休息了...<br>"); </script> 我仔细的检查过上面的代码好几次了,都没发现什么错误啊!但是浏览的时候就是空白页,什么提示框都没有,真奇怪,请指教吧!呵呵 |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
47.852ms |