close

<html>
<meta charset="UTF-8">
 <head>
  <title>期末2</title>
 </head>
 <body>
  <script>
   var balls = new Array(10);
   var i=0,j=0,k=0;
   for(i=0;i<10;i++)
   {
    balls[i]=i+1;
   }
   for(i=1;i<=1000;i++)
   {
    j=Math.floor(Math.random()*9);
    k=Math.floor(Math.random()*9);
    balls[10]=balls[j];
    balls[j]=balls[k];
    balls[k]=balls[10];
   }
   document.write(balls[0]+","+balls[1]+","+balls[2]);
  </script>
 </body>
</html> 
 

arrow
arrow
    全站熱搜

    darkspirits 發表在 痞客邦 留言(0) 人氣()