HTML and CSS Reference
In-Depth Information
◗
3.
Add the following statements to the init() function to hide the first puzzle solution
from users (see Figure 13-15):
/* Set up the initial appearance of the first puzzle */
setupPuzzle();
Figure 13-15
revising the init() function
runs the setup-
Puzzle() function
after the first
puzzle is displayed
◗
4.
Add the following statements to the swapPuzzle() function to hide each puzzle's
solution as it is swapped in by the browser (see Figure 13-16):
/* Set up the initial appearance of the puzzle */
setupPuzzle();
Figure 13-16
revising the swapPuzzle() function
runs the setupPuzzle()
function after each
puzzle is displayed
◗
5.
Save your changes to the file, and then reload
hanjie.htm
in your Web browser.
As shown in Figure 13-17, the solution of the first puzzle is hidden.