Tic-Tac-Toe | JavaScriptSource


Maximilian Stocker Sep 9, 2000
Try your luck at an interactive game of good old tic-tac-toe!! Automatic scoring and alternating "first moves" are built in. Fun!
Top-Left Top-Center Top-Right
Middle-Left Middle-Center Middle-Right
Bottom-Left Bottom-Center Bottom-Right

If you use this script, be sure to right-click
and "Save Image As..." these images then
upload them to your web site directory!

[ Right-click the images and "Save Link As..." to save! ]

The JavaScript Source: Games: Tic-Tac-Toe

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response


Hello, thanks for the code! I had a great idea for a game like tic tac toe but the board is not 3x3. It's 3x15. I play it with friends on paper all the time and I was wondering if you could help me change this code from 3x3 to 3x15. Thanks!

Emerson Dec 1, 2014

Can you explain me the function of the variable "temp" in the code?

Andreia Jul 4, 2013

I love your site. I also like to write code and try new things. Looking forward to some interesting docing practices.

Cartmell Warrington Nov 21, 2008