标签:shu 习题 amp script 输入 for else color var
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <script type="text/javascript"> var score = prompt("请输入!"); var res; if(score == ""){ res = "填写!"; }else if(score == null){ res = "取消按钮"; }else{ var fenshu = Number(score); if(fenshu>=0 && fenshu<=100){ if(fenshu >=90){ res = "优秀"; }else if(fenshu >=80){ res = "良好"; }else if(fenshu >=70){ res = "中等"; }else if(fenshu >=60){ res = "及格"; }else{ res = "不及格!"; } }else{ res = "用户输入数据不合法"; } } alert(res); </script> </body> <body> <script type="text/javascript"> for(var ji=1;ji<35;ji++){ var tu = 35-ji; if(ji*2 + tu*4 == 94){ document.write("鸡"+ji+""+"兔子"+tu); } } </script> </body> </html>
标签:shu 习题 amp script 输入 for else color var
原文地址:http://www.cnblogs.com/Marlboroo/p/6139688.html