“人品测试”的版本间的差异
来自个人维基
(以“<html> <script> var a = Math.ceil(Math.random()*100) alert(a+"你运气可真是报表了!") if (a == 100) { document.write(a+"你运气可真是报表了!") ...”为内容创建页面) |
|||
第1行: | 第1行: | ||
<html> | <html> | ||
<script> | <script> | ||
− | var a = Math.ceil(Math.random()*100 | + | var a = 1 |
− | + | function Test(){ | |
+ | a=Math.ceil(Math.random()*100) | ||
if (a == 100) { | if (a == 100) { | ||
− | + | alert(a+"!惊人的100!快去买彩票!") | |
− | }else if (a = | + | }else if (a >= 90 && a<100){ |
− | + | alert(a+".人品上好.") | |
− | }else if (a = | + | }else if (a >= 80 && a<90){ |
− | + | alert(a+".人品不错.") | |
− | + | }else if (a >= 70 && a<80){ | |
− | + | alert(a+".人品尚可.") | |
− | + | }else if (a >= 60 && a<70){ | |
− | + | alert(a+".人品还行.") | |
− | }else if (a = | + | }else if (a >= 50 && a<60){ |
− | + | alert(a+".差不到十分就及格了?.") | |
− | + | }else if (a<50){ | |
− | + | alert(a+".有点拉.") | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | }else if (a = | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | }else if (a = | + | |
− | + | ||
− | + | ||
− | + | ||
− | }else if (a | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
+ | } | ||
+ | |||
</script> | </script> | ||
− | </html>[[ | + | <button value="测试" onclick="javascript("Test()")"></button> |
+ | </html> | ||
+ | ==测完就[[爬回壶里|首页]]吧== |
2022年10月19日 (三) 20:51的版本