标签:
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <body>
</body> <script type="text/javascript">
var a = window.prompt("请输入成绩") if (90 <= a && a <= 100) { alert("优秀") } else { if (80 <= a && a <= 89) { alert("良好") } else { if (70 <= a && a <= 79) { alert("中等") } else { if (60 <= a && a <= 69) { alert("合格") } else { if (0 <= a && a <= 59) { alert("不及格") } else { } } } } }
for(var i=1;i<=4;i++){ for(var r=1;r<=10;r++){ document.write("*") } document.write("</br>") }
for(var b=1;b<=40;b++){ if(b%10==0){document.write("*"+"</br>")} else{document.write("*")} } for(var c=1;c<=9;c++){
for(var d=1;d<=c;d++){ var f=c*d; // if(d==c){document.write(c+"*"+d+"="+f+"</br>")} // else{ document.write(c+"*"+d+"="+f+" "+" "); // } } document.write("</br>") }
function num(g,h){return g - h} var x=window.prompt("请输入数字"); var y=window.prompt("请输入数字"); var z=window.prompt("请输入数字"); var w=[]; w.unshift(x,y,z); w.sort(num); w.reverse(); document.write(w);
</script> </html>
标签:
原文地址:http://www.cnblogs.com/dugufeiyang/p/5471226.html