web点前端

2014年11月5日 #

随机产生数组元素

摘要: 产生0-9之间的10个随机数,并且10个随机数不能重复;var arr = [0,1,2,3,4,5,6,7,8,9];//定个数组;for(j=0;j<=9;j++){ varc = arr[Math.floor(Math.random() * arr.length)];//产生的随机数; arr... 阅读全文

posted @ 2014-11-05 10:17 web点前端 阅读(320) 评论(0) 推荐(0)

导航