JavaScript Lesson 2: JavaScript Games!

For this lesson you will be creating a Tic Tac Toe game using JavaScript code.
This is fairly simple, but requires some crucial steps.
  1. Hopefully, you have gotten into the habit of placing the basic tags into every page you create. All of them are crucial at this point. Let's start from scratch and use these tags in a new file you will call "lesson25-your name.html"
  2. Copy these tags and put them in your new file:
    <html>
    <head>
    <title>JavaScript 2</title>
    </head>
    <body>
    
    Your Name JavaScript Lesson 2 
    </body>
    </html>

  3. Now copy these three images, the "x," the "o," and the "blank." (Yes, there is an image there. Think of it as a white square.
    To copy these images, right click on them, and select "save image as," then save them inside your "html lessons" folder.
  4. Copy this picture belowCopy this picture belowCopy this picture below
    Yes, the blank space!

  5. To get the JavaScript tags to make your Tic Tac Toe game, go to: jsmadeeasy.com/javascripts/Games/Tic-Tac-Toe

  6. Notice there are two groups of tags. One group is to be inserted into the head of your file. The head is the space between the tag <head> and the tag </head>
    The other group is to be inserted into the body of your file. The body is the space between the tag <body>and the tag </body>
  7. Play Tic Tac Toe until you beat the computer!

On to JavaScript Lesson 3

Home to Web Design

Mrs. Fields
Stayton High School
Web Design
2005-2006