Jump to content

Tic Tac Toe


kuba1234567a

Recommended Posts

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";
                    }

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...