基于随机数的抽奖器

基于随机数的抽奖器

1、定时器叠加问题,设置一个标志类解决

具体代码如下:

===========css样式==============

<style>
#container{
width: 300px;
height: 200px;
margin:0 auto;
margin-top: 120px;
border:1px solid #f90;
background: #f90;
border-radius: 20px;
font-size: 30px;
text-align: center;
color: #fff;
font-weight: bold;
}
#uname{
width: 200px;
height: 70px;
margin: 0 auto;
margin-top: 30px;
background: skyblue;
border-radius: 10px;
line-height: 70px;
cursor: pointer;
user-select: none;
}
#btn{
width: 150px;
height: 45px;
background: pink;
margin:0 auto;
margin-top: 20px;
border-radius: 5px;
line-height: 45px;
cursor: pointer;
user-select: none;
}
</style>

===========js代码==============

posted @ 2019-04-21 16:07  笨鸟不会飞~~  阅读(482)  评论(0)    收藏  举报
编辑推荐:
· 记一次 .NET 某发证机系统 崩溃分析
· 微服务架构学习与思考:SOA架构与微服务架构对比分析
· tomcat为什么假死了
· 聊一聊 Linux 上对函数进行 hook 的两种方式
· C# 锁机制全景与高效实践:从 Monitor 到 .NET 9 全新 Lock
阅读排行:
· 一周 Star 破万的开源项目「GitHub 热点速览」
· 千万级大表,如何做性能调优?
· 编码之道,道心破碎。
· 不写代码,让 AI 生成手机 APP!保姆级教程
· 记一次 .NET 某发证机系统 崩溃分析
点击右上角即可分享
微信分享提示