学习首页 百科 人生课堂 办公软件 英语学习 操作系统 故事会 编程资料 软件学习 设计
铭瑶网 >> 学习首页 >> 编程 >> 随机数据显示功能、选号器
标题:随机数据显示功能、选号器

【字体: 】 时间:2008-4-11 来源:互联网 作者:study

随机数据显示功能、选号器

<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>

查看/参与:讨论/评论 相关文章:Javascript