没事闲的做了个简单的福利彩票机选-写的不是很规范

 
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>彩票机选-演示http://tool.chinabodyart.com/lot</title>
  6. <style type="text/css">
  7. <!--
  8. *{
  9.     font-family: simsun, Verdana, Lucida, Arial, Helvetica, sans-serif;
  10.     font-size: 12px;
  11.     line-height: normal;
  12.     margin:0;
  13.     }
  14. #top {
  15.     margin-top:20px;
  16. }
  17. #menu {
  18.     width:120px;
  19.     background-color:#CCCCCC;
  20.     font-size:14px;
  21.     margin:0 auto;
  22.     padding:8px;
  23.     float:left;
  24. }
  25. #menu a,#menu a:visited{
  26.     text-align:center;
  27.     padding:4px;
  28.     display:block;
  29.     color:#000;
  30.     text-decoration:none;
  31.     margin:8px 0;
  32.     border-right-width: 8px;
  33.     border-left-width: 8px;
  34.     border-right-style: solid;
  35.     border-left-style: solid;
  36.     border-right-color: #9ab;
  37.     border-left-color: #9ab;
  38.     background-color:#FFFFFF;
  39. }
  40. #menu a:hover{
  41.     border-right-color: #000;
  42.     border-left-color: #000;
  43.     }
  44. #content{
  45.     width:800px;
  46.     height:200px;
  47.     float:left;
  48.     font-size:14px;
  49.     margin-left:20px;
  50.     }
  51. #ball {
  52.     width:44px;
  53.     height:44px;
  54.     padding:20px 20px 20px 20px;
  55.     list-style:none;
  56.     float:left;
  57.     background-image:url(r_bg.jpg);
  58.     font-size:36px;
  59.     font-family:Arial;
  60.     color:#FFF;
  61. }
  62. .b{
  63.         background-image:url(b_bg.jpg) !important;
  64.     }
  65. .red{
  66.     color:#F00;
  67.     }
  68. -->
  69. </style>
  70. <?
  71. function lot($x,$y)
  72. {$array23=array();
  73. $i=0;
  74. while(count($array23)<$y)
  75. {   $b=rand(1,$x);
  76.     if(in_array($b,$array23))
  77.     {}
  78.     else
  79.     $array23[]=$b;  
  80.     
  81. }
  82. sort($array23);
  83. return $array23;
  84. }
  85. function disp($array_dis){
  86. foreach($array_dis as $v)
  87. {
  88.     echo "<div id=ball>".$v."</div>";
  89. }   
  90.     }
  91. function disp_b($array_dis_b){
  92. foreach($array_dis_b as $v)
  93. {
  94.     echo "<div id=ball class=b>".$v."</div>";
  95. }   
  96.     }
  97. $x23=lot(23,5);
  98. $x30=lot(30,7);
  99. $x33=lot(33,6);
  100. $x16=lot(16,1);
  101. ?>
  102. <script language="javascript">
  103. function init23(){
  104.     content.innerHTML='<? disp($x23); ?>';
  105.     }
  106. function init30(){
  107.     content.innerHTML='<? disp($x30); ?>';
  108.     }
  109. function init_doub(){
  110.     content.innerHTML='<? disp($x33); disp_b($x16); ?>';
  111.     }
  112. </script>
  113. </head>
  114. <body>
  115. <div id="menu">
  116.     <a οnclick="init23()">23选5</a>
  117.     <a οnclick="init30()">30选7</a>
  118.     <a οnclick="init_doub()">双色球</a>
  119. </div>
  120. <div id="content">
  121. </div>
  122. </body>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值