Home > front end >  Written in JS a guess the number of small game
Written in JS a guess the number of small game

Time:11-01

<meta charset="utf-8" & gt; Guess Numbers & lt;/title> <The script type="text/javascript" & gt; Var b=Math. The random () * 100; Var b1=math.h ceil (b); var c=10; For (I=9. I>=0; I -) {var a=prompt (" please enter a 1 ~ 100 Numbers "); C=c - 1 the if (i> 0) {if (a<{b1) alert (" you don't have a guess! A little little a bit! You have "+ I +" chance, come on!" ); } else if (a> {b1) alert (" you don't have a guess! A little a little bit oh! You have "+ I +" chance, come on!" ); } else {b=10 - I; Alert (" congratulations you, you are only using the "+ b + guessed the" right "time); Break}}} the if (c> {0) alert (" prosperous, evening to eat chicken!" )} else {alert (" game over!!!!!!!!!!!!!!!!!!!!! "); } & lt;/script> </head> <body> </body> </html> <br/><br/><br/><br/> </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/75528.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/75528.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/75527.html'><! DOCTYPE HTML> <HTML lang="en"> <head> <meta charset="utf-8&qu</a></div> <div class="detail-arr-right">Next:<a href='/frontend/75529.html'>Myeclipse create a filter cannot in the web. The XML configuration inside the filter, @ WebFilter al</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=JavaScript' target='_blank'>JavaScript</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>