I play tic-tac-toe and I have a problem because I can't do it.
I wanted to do that if button2 is X then it changes to button1 etc. over and over again, how can I do it.
if(document.getElementById('button5').value=="X")
{
document.getElementById('button2').value="O";
}