<html>
<title>模拟抽奖-51windows.Net</title>
<head>
<meta name="keywords" content="51windows.Net">
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
</head>
<body>
<SCRIPT LANGUAGE="javascript">
var alldata = "kuhanzhu,blueidea,csdn,google,baidu,msn,qq,cctv,microsoft,adobe,aspsky" //抽奖的姓名,以,为分隔
var alldataarr = alldata.split(",")
var num = alldataarr.length-1
var timer
function change(){
 document.getElementById("oknum").value = alldataarr[GetRnd(0,num)];
}

function start(){
 clearInterval(timer);
 timer = setInterval('change()',10); //50(毫秒)为变换间隔,越小变换的越快
}

function ok(){
 clearInterval(timer);
}

function GetRnd(min,max){
 return parseInt(Math.random()*(max-min+1));
}
</SCRIPT>
模拟抽奖:<input type="text" >停止(<U>O</U>)</button>
</body>
</html>

相关文章:

  • 2022-12-23
  • 2022-01-13
  • 2021-09-16
  • 2021-10-09
  • 2021-04-16
  • 2022-12-23
  • 2021-08-08
  • 2021-10-06
猜你喜欢
  • 2021-12-24
  • 2021-09-27
  • 2022-12-23
  • 2021-07-11
  • 2021-12-19
  • 2021-05-25
  • 2021-04-27
相关资源
相似解决方案