站 内 搜 索
推 荐 合 作 商
优 秀 内 容 推 荐
  您当前位置:中国素材首页 >> 网页特效 >> 其他类 >> 随机数据显示功能(可用于选号器)
 
随机数据显示功能(可用于选号器)
中国素材网 www.sucai.com 2007-7-20 15:51:00 流量数:

请根据需要修改
[查看演示]  源码如下
----------------------------------------------------------------------------------------
<script language="javascript">



function Quickpick()
{
var ball

for( ball = 0; ball < 5; ball++)
{
this[ball] = parseInt((Math.random() * Math.pow(10,16)) % 49) + 1;
for(var list = 0; list < ball; list++)
{
if(this[list] == this[ball])
{
list = ball;
ball--;
}
}
}
this[ball] = parseInt((Math.random() * Math.pow(10,16)) % 42) + 1;
return this;
}



</script>
<script language="javascript">

var idx;
var powerball = new Array(6);

powerball = this.Quickpick();

document.write("<center>");
document.write("体育彩票选号器");
document.write("<hr width=400><font size=+2>");
for(idx = 0; idx < 5; idx++)
document.write(powerball[idx] + " - ")
document.write("</font><font color=#D00000 size=+2>" + powerball[idx] + "</font>");
document.write("</center>");
</script>