Git Product home page Git Product logo

lottery's Introduction

网上看到一个不错的年会抽奖程序改良版

使用和改动须知

  1. 需要成员需要提前替换,可以按照member.js文件中的格式来填入
  2. 这个抽奖小程序使用的是本地localStorage来存储,刷新后之前抽奖数据会保留,需要重置后数据才会清空
  3. 如果需要替换下面的按钮名字和值,替换index.html中的btns变量即可,具体可以看代码

抽奖流程

滚动鼠标滚轮,可以放大或缩小球体

  1. 用浏览器打开文件夹中的index.html文件
  2. 选择当次要抽奖的人数
  3. 点击『开始』按钮,进入抽奖状态(这个过程仍可修改抽奖人数)
  4. 点击『停!』按钮,生成抽奖结果
  5. 点击任意人数按钮,可以回到闲置状态,已中奖的用户标记为黄色,不会二次命中

小工具

如果你只有名字,需要生成member.js中的格式,可以在浏览器控制台按照以下方式生成:

arr = ['张三', '李四', '王五', '赵二'];
copy(arr.map((e,i)=>{return {phone:`No.${i+1}`, name:e}}))

lottery's People

Contributors

fouber avatar qingfenglee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.