<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#isyou {
font-size: 80px;
text-align: center;
margin: 100px auto;
}
#btn {
width: 180px;
height: 60px;
border: none;
background: dodgerblue;
display: block;
margin: 0 auto;
color: #fff;
font-size: 30px;
border-radius: 6px;
text-align: center;
line-height: 60px;
cursor: pointer;
}
#btn:active {
background: slateblue;
}
</style>
</head>
<body>
<div >请点击下面的按钮,开始抽奖</div>
<span >点击开始</span>
</body>
<script type="text/javascript">
var str = '内容,内容';
var arr = str.split(",")
var oIsyou = ("isyou")
var obtn = ("btn")
var onOff = true;
var timer;
= function () {
if (onOff) {
timer = setInterval(function () {
var i = (() * ( - 1))
= arr[i]
}, 30)
= "点击停止";
onOff = false
} else {
= "点击开始";
clearInterval(timer);
onOff = true
}
}
</script>