home / experts / javascript / column47 |
|
Loading the Game's BoardNow that the DOM is ready, we need to assign the right images to the right nodes. We first define the row loading function:
Notice how easy it is to assign an image file name to a DOM's node. You just use an HTML attribute of the relevant tag (
Notice the
The
We build the rectangular board area by calling the
Finally, we build the game's DOM similarly to how we did it for the sliding puzzle. The board consists of
|
Produced by Yehuda Shiran and Tomer Shiran
Created: August 30, 1999
Revised: August 30, 1999
URL: http://www.webreference.com/js/column47/load.html