Hangman

A game of hangman which allows you to supply your own words.

Feel free to use this script yourself on any site that you wish, but if you do, please place a link from your website to mine, you can use the following HTML <a href="http://www.c-g-f.net/">JavaScript by Chris Fortey</a>

First place the following in the HEAD tag of the HTML document.

Save the following images to your computer (make sure you use the image name show below each image). The images should be saved in the same folder as the HTML document.

image for the hangman game
hmstart.gif
image for the hangman game
hm1.gif
image for the hangman game
hm2.gif
image for the hangman game
hm3.gif
image for the hangman game
hm4.gif
image for the hangman game
hm5.gif
image for the hangman game
hm6.gif
image for the hangman game
hm7.gif
image for the hangman game
hm8.gif
image for the hangman game
hm9.gif
image for the hangman game
hm10.gif

Place the follow code in the HTML document where you want the game to appear.

Finally, place the replace the start BODY tag with the following:

To change the words used, find the code that starts 'var words = new Array()'. Words for the game appear inbetween the brakets in double quotes, with a comma sperating the words.

For exampe to use the words APPLE and PEARS the code would be: var words = new Array("APPLE", "PEARS")

To use the words APPLE, PEARS and STAIRS and the code would be: var words = new Array("APPLE", "PEARS", "STAIRS")

Words should be in uppercase.

Image used to display stages of errors.

Display Word:
Used Letters:

A | B | C | D | E | F | G | H | I | J | K | L M
N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Start game / Reset game

Back to downloads