php jQuery 年会抽奖,jquery 年会抽奖程序
看了一下,传不了源代码,特粘帖html
.center
{
text-align: center;
height: auto;
}
.center span
{
font-size: 50px;
font-weight: 900;
line-height: 50px;
}
.center img
{
width: 1200px;
height: 580px;
}
.s_chg
{
float: left;
width: 1240px;
height: auto;
margin-left:40px;
}
.s_chg img
{
width: 240px;
height: 120px;
padding-top:10px;
}
.s_title
{
color:Red;
font-size :35px;
font-weight:bold;
}
1
查看全部获奖
查看一等奖获奖
查看二等奖获奖
查看三等奖获奖
开始抽奖
var time = 0;
var th = 9;
var two = 5;
var f =1;
var max = 122;
var t;
var zhong = new Array();
function sshow() {
$("#i_div").show();
$("#s_div").hide();
}
function wshow(e) {
var s_sum;
switch (e) {
case 0:
s_sum = th + two + f;
break;
case 1:
s_sum = th + two + f;
break;
case 2:
s_sum = th + two;
break;
case 3:
s_sum = th;
break;
}
if (zhong.length < s_sum) {
var cha = (s_sum) - (zhong.length);
alert("名额还差 "+cha.toString()+" 名");
return;
}
$("#i_div").hide();
$("#s_div").show();
var sdiv = $("#s_div");
sdiv.children().remove();
if (e == 0 || e == 3) {
var html = "三等奖
";
sdiv.prepend(html);
for (var i = 0; i < th; i++) {
html = " ";
sdiv.prepend(html);
}
}
if (e == 0 || e == 2) {
html = "二等奖
";
sdiv.prepend(html);
for (var i = (th); i < (th + two); i++) {
html = " ";
sdiv.prepend(html);
}
}
if (e == 0 || e == 1) {
html = "一等奖
";
sdiv.prepend(html);
for (var i = (th + two); i < (th + two + f); i++) {
html = " ";
sdiv.prepend(html);
}
}
}
function addtime() {
if (time == max)
time =0;
time=time+1;
$("#chg").html(time);
$("#chg_img").attr("src", "Content/images/JPEG/1 (" +time+ ").jpg");
t = setTimeout("addtime()", 20);
}
function stoptime() {
clearTimeout(t);
while (chkzhong() == 1) {
}
zhong.push(time);
$("#chg_img").attr("src", "Content/images/JPEG/1 (" + time + ").jpg");
}
function chg() {
if (zhong.length == (th + two + f)) {
alert("抽奖名额已全,请查看");
return;
}
if ($("#chg").attr("atg") == "0") {
$("#chg").attr("atg", "1");
addtime();
} else {
$("#chg").attr("atg", "0");
stoptime();
if (zhong.length == (th )) {
alert("三等奖已经抽完 ");
return;
}
if (zhong.length == (th + two )) {
alert("二等奖已经抽完 ");
return;
}
if (zhong.length == (th + two + f )) {
alert("一等奖已经抽完");
return;
}
}
}
function chkzhong() {
for (var it in zhong) {
if (it == time) {
if (time == max)
time=0
time = time + 1;
return 1;
} else {
return 0;
}
}
}
php jQuery 年会抽奖,jquery 年会抽奖程序相关推荐
- js框架jquery实现幸运大转盘抽奖程序代码,兼容多种浏览器
原文:js框架jquery实现幸运大转盘抽奖程序代码,兼容多种浏览器 源代码下载地址:http://www.zuidaima.com/share/1779633798073344.htm 看到网页上有 ...
- 微信转发抽奖+php,jQuery+PHP实现微信转盘抽奖功能的方法
本文实例讲述了jQuery+PHP实现微信转盘抽奖功能的方法.分享给大家供大家参考,具体如下: 本文结合实例将使用jQuery和PHP来实现转盘抽奖程序. 准备工作 首先要准备素材,抽奖的界面用到两张 ...
- PHP做大转盘抽奖的思路,jQuery+PHP实现微信转盘抽奖功能的方法
本文实例讲述了jQuery+PHP实现微信转盘抽奖功能的方法.分享给大家供大家参考,具体如下: 本文结合实例将使用jQuery和PHP来实现转盘抽奖程序. 准备工作 首先要准备素材,抽奖的界面用到两张 ...
- 翻牌抽奖 php,PHP+jQuery开发简单的翻牌抽奖实例
PHP+jQuery开发简单的翻牌抽奖实例,实现流程:页面放置6个方块作为奖项,当抽奖者点击某一块时,方块翻转到背面,显示中奖信息,这个奖品是随机的,不是固定的. 在页面上放置6个奖项: 1 2 3 ...
- 扭蛋机html源码,jQuery动画扭蛋机抽奖代码
特效描述:jQuery动画 扭蛋机抽奖.jQuery动画扭蛋机抽奖代码 代码结构 1. 引入CSS 2. 引入JS 3. HTML代码 100/次 10000 > 恭喜你! 获得一等奖! 恭喜你 ...
- 摇一摇抽奖 php,利用HTML5的devicemotion事件实现手机摇一摇抽奖,年会抽奖
摇一摇JS脚本逻辑: 接下来是移动端JS脚本逻辑的实现,摇一摇的实现需借助html5新增的devicemotion事件,获取设备在位置和方向上的改变速度的相关信息,该事件的基本使用如下:if (win ...
- 苹果手机html5摇一摇游戏戏码,利用HTML5的devicemotion事件实现手机摇一摇抽奖,年会抽奖,html5devicemotion...
利用HTML5的devicemotion事件实现手机摇一摇抽奖,年会抽奖,html5devicemotion 摇一摇JS脚本逻辑: 接下来是移动端JS脚本逻辑的实现,摇一摇的实现需借助html5新增的 ...
- php jq实现抽奖,jquery实现抽奖系统
闲来无事做了一个抽奖的系统: 抽奖系统 #box{ width:450px; margin:0 auto; } .show{ width:100px; height:55px; text-align: ...
- jquery php 抽奖,jquery实现抽奖系统
闲来无事做了一个抽奖的系统: 抽奖系统 #box{ width:450px; margin:0 auto; } .show{ width:100px; height:55px; text-align: ...
- jquery实现酷炫的抽奖器效果
请在这里查看示例 ☞ award示例 使用介绍 可以自定义行.列数以及每次选中的个数 点击初始化按钮,即可加载功能,点击开始抽奖进行第一次抽奖 已抽过的用户不会再被抽到 鼠标移出再移入可继续下一次抽奖 ...
最新文章
- 【干货书】数据科学家统计学基础:R和Python实战
- php偷取,PHP偷取UTF-8目标网页内容输出为空白
- JavaWeb(四)——在IDEA中配置Tomcat、pom文件
- JavaWeb图书管理系统day01
- SQL数据库中日期时间类型,按日期group by 实现
- 免疫算法(matlab)
- 整个人麻掉!这竟然是一家可以养老的互联网大厂...
- 将pdf文件缩小的最快速方法,pdf文件变小的方法
- jQuery- 跟着李南江学编程
- STM32CubeMX:中断函数例题:2021-08-03
- 2021-12-23 714. 买卖股票的时机含手续费(动态规划)
- java word apache poi 操作word模板。
- 使用gdebi去解决安装deb包的时候软件依赖问题
- 基于佟刚老师视频教程的Spring MVC数据类型转换学习总结
- Kafka源码分析10:副本状态机ReplicaStateMachine详解 (图解+秒懂+史上最全)
- Android百度地图地理围栏定位间隔
- Linux运维工程师学习目标
- 【NOIP模拟】 (11.6) T1 Blash数集
- html br excel,如何将页面的
在Excel中正确换行
- 2W字 详解20道Redis经典面试题(珍藏版)