某个函数disp():
function disp(){
var a = Math.floor(0+Math.random() * 2);
var b = Math.floor(2+Math.random() * 3);
var c = Math.floor(6+Math.random() * 2);
var data = ["(111,222,333)", "(232,977,888)", "(144,168,303)"];
var change = function () {
var rgb_1 = data[Math.floor(Math.random() * 3)];
return "rgb" + rgb_1 + "";
}
squre[a].style.backgroundColor = change();
squre[b].style.backgroundColor = change();
squre[c].style.backgroundColor = change();
setTimeout(function () {
squre[a].style.backgroundColor = "#ff7b45";
squre[b].style.backgroundColor = "#ff7b45";
squre[c].style.backgroundColor = "#ff7b45";
}, 1000)
}
$("#bt").click(function(){
某个函数()开始循环执行;
})
$("#bt2").click(function(){
某个函数();怎么停止?
})