练习题21_0-100的随机数字.html 340 B

123456789101112131415
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. // 生成0-100的随机数字
  11. var num = Math.floor(Math.random()*101);
  12. console.log(num);
  13. </script>
  14. </body>
  15. </html>