1. Computing & Technology

Unobtrusive Hangman

Answer generator

Enter the answers you want your hangman script to select from one at a time into the following form. This will "encrypt" your answers to stop people cheating the game by viewing the source.

Create Hangman Answers

Save the above code as hangq.js (or a different name of your choice if you are making multiple games. As you can see the code that represents each of your answers doesn't look anything like the actual word that you selected as the answer so if people view the source they still will not know what your possible answers are. The script will choose one of your answers at random each time the game is played.

Oops, nearly forgot the images. You can either use my images or substitute your own (as long as they are 100 by 100 pixel gif files called hang0.gif through hang10.gif). You just need to save the images to the same folder as holds the other files for the game.

©2012 About.com. All rights reserved.

A part of The New York Times Company.