任何人都可以解释为什么我不能停止并开始这个循环吗?
<input type="button" value="start" onclick="start()">
<input type="reset" value="stop" onClick="stop()">
var startLottery = false;
while(startLottery){
setInterval(function(){automateLottery()},120);
startLottery;
};
var start = function(){
startLottery = true;
};
var stop = function(){
startLottery = false;
};
谢谢