.c{
margin: auto;
height: 200px;
width: 600px;
border: 1px dashed black;
}
h1{
color: blue;
text-align: center;
line-height: 100px;
font-size: 80px;
}
.btn{
margin: auto;
height: 100px;
width: 600px;
/* border: 1px solid; */
text-align: center;
margin-top: 20px;
}
| `
年会抽奖
<script type="text/javascript">
var people = ['一','二','张三','李四','王五','六','七','八','九','十','十一','十二'];
var sti = null;
function start(){
sti = setInterval(function(){
var name = people[Math.ceil(Math.random()*10)];
document.getElementById("text").innerText = name;
},100)
}
function stop(){
clearInterval(sti);
}
</script>
来源:CSDN
作者:一个很菜的程序媛
链接:https://blog.csdn.net/qq_45832807/article/details/103479425