您正在使用 IPV4 [184.72.135.210] 访问本站,您本次已经查看了 1 页
用户名: 密 码: 验证码:     用QQ登录本站
首页 软件 编程 笑话 知识 公告 台风 日历 计算器
悟空收录网       [公益]保护绿色环境,构建和谐社会      

【腾讯云】 爆款2核2G3M云服务器首年 61元,叠加红包再享折上折      
[公益] 地球是我家,绿化靠大家      
2024年 清明节 007
2024年 劳动节 034
2025年 元 旦 279
2025年 春 节 307
 
您现在的位置:首页 >> 脚本代码 >> 内容
本类新增
本类热门
Js模拟抽奖的效果
内容摘要: html head meta http-equiv='Content-Language' content='zh-cn' meta http-equiv='Content-Type' content='text/html; charset=gb2312' title网页特效代码---Js模拟抽奖的效果/title /head body style type=......
<html>

<head>

<meta http-equiv="Content-Language" content="zh-cn">

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效代码---Js模拟抽奖的效果</title>

</head>

<body>

<style type="text/css">

.a1{

position:relative;

font-family:Verdana;

font-size:20px;

color:#889978;

}

</style>

<script language="JavaScript">

function lotto(){

if (!document.all && !document.layers)

return

for (j=1; j < 48; j++)//stop zero!?

{

var a=Math.round(Math.random()*j+1);

var b=Math.round(Math.random()*j+1);

var c=Math.round(Math.random()*j+1);

var d=Math.round(Math.random()*j+1);

var e=Math.round(Math.random()*j+1);

var f=Math.round(Math.random()*j+1);

}

var x=new Array(a,b,c,d,e,f);

if ((x[0] == x[1]) || (x[0] == x[2]) || (x[0] == x[3]) || (x[0] == x[3]) || (x[0] == x[5]) ||

(x[1] == x[2]) || (x[1] == x[3]) || (x[1] == x[4]) || (x[1] == x[5]) ||

(x[2] == x[3]) || (x[2] == x[4]) || (x[2] == x[5]) ||

(x[3] == x[4]) || (x[3] == x[5]) ||

(x[4] == x[5]) || (x[5] == x[4]))

lotto();//restart

else

{

var y=x.toString();

var z=y.split(',');

for (i=0; i < z.length; i++)

{

z[i]=z[i]+" ";

if (z[i].length < 3)//add '0' to singles

z[i]="0"+z[i]+" ";

}

z=z.sort();

Nos=z[0]+z[1]+z[2]+z[3]+z[4]+z[5];

if (document.all)

{document.all.layer1.innerHTML=Nos;}//OR Z!

else if (document.layers)

{

document.layers.layer1.document.open();

document.layers.layer1.document.write("<span style='position:absolute;top:0px;left:0px;font-family:Verdana;font-size:20px;color:#888888;text-align:center'> "+Nos+"</span>");

document.layers.layer1.document.close();

}

T=setTimeout('lotto()',10);

}

}

//-->

</script>

<table border='0' width=250 height=50>

<tr valign='middle'>

<td align='center'>

<form name=form>

<input type=button value='点击看看你有没有中将' onClick="lotto(),setTimeout('clearTimeout(T)',3000)">

</form>

<span id=layer1 class=a1>Result</span>

</td>

</tr>

</table>

</body>

</html>

版权声明:本内容来源于网络,如有侵犯您的版权,请联系站长,本站收到您的信息后将及时处理。
上一篇:使用JS实现复选框批量选择

 

下一篇:在规定时间内方有效的按钮

发布日期:2021/6/15
手机扫二维码直达本页
发布时间:12:34:56
点  击:9
录  入:壹家怡园
相关文章
Baidu
YiJiaCMS 7.3.8 build231228(MSSQL) 闽ICP备05000814号-1
本空间由腾讯云(轻量应用服务器)提供,Cloudflare提供加速防护
运行时间载入中.....