HTML and CSS Reference
In-Depth Information
Figure 13-13
Puzzles 2 and 3
You've completed the first part of your project, which was to load the puzzles into
specific elements on Rebecca's Web page. In the next session, you'll complete the hanjie
app by providing users with the tools to solve Rebecca's puzzles.
Session 13.1 Quick Check
1. What is the document object model?
2. Provide an expression to reference the third inline image within a document.
3. An element from a Web document has the id attribute value topButtons .
Provide an expression referencing this object.
4. Provide an expression to reference all elements belonging to the
custOrder class.
5. Provide a statement to store the object collection of all paragraph elements in
the document in a variable named allParagraphs .
6. Provide the JavaScript statement to run the setup() function when the page is
loaded by a browser.
7. A button on the Web page has the id value newGame . Provide a JavaScript state-
ment to run the restart() function when this button is clicked.
8. The movePiece() function can be called by several different page elements in
response to an event occurring within the Web page. Provide an expression to
return the id of the calling element.
9. If playerID is a variable, what does the expression eval(“playerID”) return?
Search WWH ::

Custom Search