⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prise.jsp

📁 java随机抽奖
💻 JSP
字号:
<%@ page language="java"  contentType="text/html;charset=GBK" %>

<HTML>
<HEAD>
<TITLE>抽奖程序</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<SCRIPT LANGUAGE="JavaScript">


var pro_timeout = null;
var flash_timeout = null;
function start_pro(){
   document.all.sound.src="";
   document.all.pro_index.innerHTML=pro_index;
   window.clearTimeout(flash_timeout);
   document.all("rollbar").style.filter="Glow(color=#FFFFFF,strength=6)";
   members = document.frames("members").getArry();
   if(members.length<2){
	   alert("抽奖人员必须超过2人!"); 
	   return;
   }
  change();
  document.all.start_btn.disabled = true;
  document.all.stop_btn.disabled = false;
  document.all.return_btn.disabled=true;
  document.all.done_btn.disabled=true;
}
var members = null;

function change(){
   var index = Math.round(Math.random()*(members.length-1));
   document.all.p1.innerHTML=members[index].replace("_"," ");
   pro_timeout = window.setTimeout("change()",5);
}

function stop_pro(){
   flash();
   document.all.sound.src="rw131.mp3";
   window.clearTimeout(pro_timeout);
   document.all.start_btn.disabled = false;
   document.all.stop_btn.disabled = true;

  document.all.return_btn.disabled=false;
  document.all.done_btn.disabled=false;

   document.frames("members").action(document.all.p1.innerHTML.replace(" ","_"),1);
}

var strth = 0;
function flash(){
    if(strth<120){
		strth+=6;
	}else{
        strth=6;
	}
	//alert(strth);
	document.all("rollbar").style.filter="Glow(color=#FFFFFF,strength="+strth+")";
	flash_timeout = window.setTimeout("flash()",1);
}//bg_all.gif

var pro_index= 1;

function checkMember(){
  document.all.memberTR.style.display="";
  document.all.memberPRC.style.display="none";
  document.all.return_btn.style.display="";
  document.all.done_btn.style.display="none";

  document.all.start_btn.disabled = true;
  document.all.stop_btn.disabled = true;
}

function returnBack(){
  document.all.memberTR.style.display="none";
  document.all.memberPRC.style.display="";
  document.all.return_btn.style.display="none";
  document.all.done_btn.style.display="";

   document.all.start_btn.disabled = false;
  document.all.stop_btn.disabled = true;
}


</SCRIPT>
<BODY background="bg_all.gif">
<bgsound ID="sound" src="" width=145 height=30 autostart=true loop=-1 volume=50>
<CENTER>
<TABLE border="0" style="width:100%;background-image: logo_blue.GIF">
<TR >
	<TD colspan="3" style="width:60%;height:100" align="center"><FONT style="FONT-SIZE: 50pt; FILTER: glow(color=#FFFFFF,strength=6); WIDTH: 100%; COLOR: #ffff00; LINE-HEIGHT: 150%; FONT-FAMILY: 华文行楷">第<span id="pro_index">1</span>位幸运者</FONT></TD>
</TR>
<TR id="memberPRC">
	<TD colspan="3" style="width:60%;height:expression(document.body.offsetHeight-200)" align="center"><FONT id="rollbar" style="FONT-SIZE: 120pt; FILTER: glow(color=#FFFFFF,strength=6); WIDTH: 100%; COLOR: #ffff00; LINE-HEIGHT: 150%; FONT-FAMILY: 隶书"><SPAN ID="p1" ></SPAN></FONT></TD>
</TR>
<TR id="memberTR" style="display:none">
	<TD  colspan="3" style="display:;width:60%;height:expression(document.body.offsetHeight-200)" align="left"><FONT style="FONT-SIZE: 20pt; FILTER: glow(color=#FFFFFF,strength=1); WIDTH: 100%; COLOR: #ffff00; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体"><SPAN ID="p3" style="display:"></SPAN></FONT></TD>
</TR>
<TR>
	<TD style="width:20%">&nbsp;</TD>
	<TD style="width:60%">&nbsp;</TD>
	<TD style="width:20%"><INPUT TYPE="button" value=" 开 始 " name="start_btn" onclick="start_pro()"><INPUT TYPE="button" disabled name="stop_btn" value=" 停 止 " onclick="stop_pro()"><INPUT TYPE="button" name="return_btn" value="返回抽奖节目" style="display:none" onclick='returnBack()'><INPUT TYPE="button" name="done_btn" value="查看获奖名单" onclick='checkMember()'><INPUT TYPE="button" name="Init_btn" value="初始化" onclick='if(confirm("初始化将会把所有人员都加入抽奖名单中,重新进行抽奖,确定吗?")){document.frames("members").Init()}'></TD>
</TR>

</TABLE>
<SPAN ID="ms" style="display:none">代抽奖名单:</SPAN><br>

<IFRAME ID="members" FRAMEBORDER=1 SRC="prise_action.jsp" style="display:none;width:97%"></IFRAME></CENTER>
<script language="JavaScript" src="snow.js"></SCRIPT>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -