Oh. I have a bingo game I did and what I did was use variables, box1, box2, box3, etc. Then each time check these to see if they were a winner.
See if this will work.
Something like: (untested)
//Code for button 1 run javascript
box1 = 1;
checkWin();
var box1 = 0;
var box2 = 0;
var box3 = 0;
function checkWin()
{
myCheck = box1 + box2 + box3;
if (myCheck == “111” ) { alert(“Yes”); }
}