<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>DDCT-抽奖 </title>
<style type="text/css">
<!--
.style9 {font-size: x-large;
color: #FF6600;
font-weight: bold;}
-->
</style>
</head>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 00px;
}
.style2 {
font-size: xx-large;
color: #FF6600;
font-weight: bold;
}
.style3 {color: #FF6600}
.style13 {color: #FF6600; height:35; font-size:16px}
.style8 {
font-size: x-large;
color: #0033FF;
font-weight: bold;
}
-->
</style>
<script>
var timer;
var k=1;
var numb="";
var reads=0;
var arry = new Array();
var arry1="";
var arry2="";
var arry3="";
var j=1;
var removes=-1;
function loads(){
var y=0;
for(var i=302;i <402;i++)
{
arry[y]=i;
y++;
}
} function startTimer()
{
timer= setInterval("startTimer2()",50);
}
function startTimer2()
{
if(reads>0){
if(k <(j*100)){
var i=Math.floor(Math.random()*100); document.getElementById("shownumber").innerHTML=arry[i];
numb=arry[i];
removes=i;
k++;
}
}else{
clearInterval(timer)
alert("请选择奖项!");
return false;
} }
function stopTimer(){
clearInterval(timer);
if(removes>-1){
arry.splice(removes);
k=j*1000;
j++;
if(reads==1)
{
arry1+=numb+" ";
document.getElementById("shows").innerHTML="一等奖中奖号码为:"+arry1;
}
if(reads==2)
{
arry2+=numb+" ";
document.getElementById("shows2").innerHTML="二等奖中奖号码为:"+arry2;
}
if(reads==3)
{
arry3+=numb+" ";
document.getElementById("shows3").innerHTML=" 三等奖中奖号码为:"+arry3;
}
}
k=1
}
function aa(ids)
{
reads=ids;
}
</script>
<body onLoad="loads()">
<table width="1014" border="0" align="center">
<tr>
<td width="1007" height="106"> <div align="center"> <span class="style9">公司抽奖活动 </span> </div> </td>
</tr>
<tr>
<td height="226" align="center" valign="top">
<br>
<br>
<br>
<table width="943" border="0">
<tr>
<td width="391" height="33"> <div align="right" class="style3">
<input type="radio" name="radiobutton" onClick="aa(1)" value="1">
一等奖 </div> </td>
<td width="542" rowspan="3" valign="bottom">
<fieldset style="width:50 "> <legend>开奖区: </legend>
<table width="169" height="99" border="0">
<tr>
<td width="163"> <div align="center" id="shownumber" class="style2"> </div> </td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td height="33"> <div align="right" class="style3">
<input type="radio" name="radiobutton" onClick="aa(2)" value="2">
二等奖 </div> </td>
</tr>
<tr>
<td height="33"> <div align="right" class="style3">
<input type="radio" name="radiobutton" onClick="aa(3)" value="3">
三等奖 </div> </td>
</tr>
<tr>
<td height="47"> </td>
<td width="542"> <input name="Submit" type="button" class="style13" value="开始" onClick="startTimer()">
<input name="Submit" type="button" class="style13" value="停止" onClick="stopTimer()"> </td>
</tr>
</table>
</td>
</tr>
</table> <table width="1013" border="0" align="center">
<tr>
<td width="269" height="18"> </td>
<td width="734"> <div id="shows" align="left" class="style8"> </div> </td>
</tr>
<tr>
<td> </td>
<td> <div id="shows2" align="left" class="style8"> </div> </td>
</tr>
<tr>
<td> </td>
<td> <div id="shows3" align="left" class="style8"> </div> </td>
</tr>
</table>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>DDCT-抽奖 </title>
<style type="text/css">
<!--
.style9 {font-size: x-large;
color: #FF6600;
font-weight: bold;}
-->
</style>
</head>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 00px;
}
.style2 {
font-size: xx-large;
color: #FF6600;
font-weight: bold;
}
.style3 {color: #FF6600}
.style13 {color: #FF6600; height:35; font-size:16px}
.style8 {
font-size: x-large;
color: #0033FF;
font-weight: bold;
}
-->
</style>
<script>
var timer;
var k=1;
var numb="";
var reads=0;
var arry = new Array();
var arry1="";
var arry2="";
var arry3="";
var j=1;
var removes=-1;
function loads(){
var y=0;
for(var i=302;i <402;i++)
{
arry[y]=i;
y++;
}
} function startTimer()
{
timer= setInterval("startTimer2()",50);
}
function startTimer2()
{
if(reads>0){
if(k <(j*100)){
var i=Math.floor(Math.random()*100); document.getElementById("shownumber").innerHTML=arry[i];
numb=arry[i];
removes=i;
k++;
}
}else{
clearInterval(timer)
alert("请选择奖项!");
return false;
} }
function stopTimer(){
clearInterval(timer);
if(removes>-1){
arry.splice(removes);
k=j*1000;
j++;
if(reads==1)
{
arry1+=numb+" ";
document.getElementById("shows").innerHTML="一等奖中奖号码为:"+arry1;
}
if(reads==2)
{
arry2+=numb+" ";
document.getElementById("shows2").innerHTML="二等奖中奖号码为:"+arry2;
}
if(reads==3)
{
arry3+=numb+" ";
document.getElementById("shows3").innerHTML=" 三等奖中奖号码为:"+arry3;
}
}
k=1
}
function aa(ids)
{
reads=ids;
}
</script>
<body onLoad="loads()">
<table width="1014" border="0" align="center">
<tr>
<td width="1007" height="106"> <div align="center"> <span class="style9">公司抽奖活动 </span> </div> </td>
</tr>
<tr>
<td height="226" align="center" valign="top">
<br>
<br>
<br>
<table width="943" border="0">
<tr>
<td width="391" height="33"> <div align="right" class="style3">
<input type="radio" name="radiobutton" onClick="aa(1)" value="1">
一等奖 </div> </td>
<td width="542" rowspan="3" valign="bottom">
<fieldset style="width:50 "> <legend>开奖区: </legend>
<table width="169" height="99" border="0">
<tr>
<td width="163"> <div align="center" id="shownumber" class="style2"> </div> </td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td height="33"> <div align="right" class="style3">
<input type="radio" name="radiobutton" onClick="aa(2)" value="2">
二等奖 </div> </td>
</tr>
<tr>
<td height="33"> <div align="right" class="style3">
<input type="radio" name="radiobutton" onClick="aa(3)" value="3">
三等奖 </div> </td>
</tr>
<tr>
<td height="47"> </td>
<td width="542"> <input name="Submit" type="button" class="style13" value="开始" onClick="startTimer()">
<input name="Submit" type="button" class="style13" value="停止" onClick="stopTimer()"> </td>
</tr>
</table>
</td>
</tr>
</table> <table width="1013" border="0" align="center">
<tr>
<td width="269" height="18"> </td>
<td width="734"> <div id="shows" align="left" class="style8"> </div> </td>
</tr>
<tr>
<td> </td>
<td> <div id="shows2" align="left" class="style8"> </div> </td>
</tr>
<tr>
<td> </td>
<td> <div id="shows3" align="left" class="style8"> </div> </td>
</tr>
</table>
</body>
</html>
解决方案 »
- 通过JQuery改变图片的样式,有什么方法?
- 应用js或jQuery+div做一个弹出窗口
- 求美观一点的帮助页面代码(就是跳转时的错误页面代码)在线等...
- 高手帮忙看看。这个广告效果的大FLASH是居左的。怎么才能让它居中啊?
- 在线等!急问,梅花雪2的树怎样取得点击的节点的date
- 如何用javascript 求每个月的第一个星期五?
- 一个文本框,onclick事情,如何控制第一次单击有效,以后再单击失效
- 如何判断focus在哪个控件上???
- 高分求助如何在update文件中用程序取得test.asp中的<input>标签的name字符
- IE6下的document.body=null,这是为什么?
- 简单的代码,为什么出错?
- 傲游插件能不能实现这个功能
不过想不重复那到有变通的办法while(arry2==arry1)
{arry2=Math.floor(Math.random()*100)}