1. Home
  2. Computing & Technology
  3. JavaScript

Concentration Memory Game

2. Head Script

clr gif
More of this Feature

Introduction Body Script

The script for the memory game is in three parts. The first two part go in the head section of your web page. The first step is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called memoryh.js.

Next select the code from the text box below and copy it into a file called memory.css.

You next attach these into the head section of your page.

<script type="text/javascript" src="memoryh.js">
</script>
<link rel="stylesheet" href="memory.css" type="text/css" />

Now all that remains is to add the body script where you want the game to appear.

Sample Page | Head Script | Body Script
Explore JavaScript
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2010 About.com, a part of The New York Times Company.

All rights reserved.