好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

JavaScript实现彩票中随机数组的获取_html/css_WEB-ITnose

1.效果图:

             Math.random方法彩票随机数的生成                  开始      获取随机数组             //获取节点       var btnGo = document.getElementById("btnGo");       var btnStop = document.getElementById("btnStop");       var text = document.getElementById("text");       //定义生成最小到最大值的随机函数       function rand(min,max){            return parseInt(Math.random()*( max - min + 1) + min);       }              function start(min,max,length){            //定义空数组          var arr = [];          while(arr.length    

2.复杂版

             Math.random方法彩票随机数的生成-升级版            *{          margin: 0;          padding: 0;      }      .wrap{          width: 600px;          height: 300px;          background-color: #f8e2e2;          margin: 0 auto;      }      .list{          width: 440px;          /*border: 1px solid red;*/          margin: 0px auto;      }      .list li{           list-style: none;           width: 30px;           height: 30px;           display: inline-block;           border: 1px solid #fff;           border-radius: 30px;           line-height: 30px;           text-align: center;           margin: 15px auto 15px;           /*background-color: #f8f8f8;*/           /*background-color: rgba(255,255,255,1);*/      }      .wrap p{          text-align: center;      }      .wrap p button{          text-align: center;          width: 100px;      }      #setBtn{          background-color: red;          color: #fff;          border: none;      }      .active{          background-color: red;          color: #fff;      }              

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

随机红球 清空

查看更多关于JavaScript实现彩票中随机数组的获取_html/css_WEB-ITnose的详细内容...

  阅读:35次