HTML and CSS Reference
In-Depth Information
You've completed your work on the hanjie puzzle app. Rebecca has left you two other
puzzles from the
grids2.js
file as a challenge if you want to try your hand at solving a
new puzzle. However, that is not required to complete the assignment!
Rebecca wants to add other types of Japanese logic puzzles to her Web site. After
working on this project, she's confident that you can develop more apps for her in
the future.
Session 13.2 Quick Check
1.
Provide a command to change the source of the second inline image in a docu-
ment to the file
jigsaw.png
.
2.
The first
article
element in a document has its width in pixels set with an
inline style. Provide a command to retrieve the value of that element's width,
storing
only
the numeric value in the
articleWidth
variable.
3.
Provide the JavaScript expression to create an object collection named
allBookmarks
based on the following CSS selector pattern:
#main article span.bookmark
4.
Provide a JavaScript expression to create a variable named
firstBookmark
that
returns the first object found from the following CSS selector pattern:
#main article span.bookmark
5.
Write a program loop for the
allBookmarks
collection to add an
onclick
event
handler to each object in the collection, running the jumpToPage() function
when clicked.
6.
Create an object collection named
allParagraphs
to match every paragraph in
the Web document, and then provide the code to remove all inline font-size
styles from every object in that collection.
7.
Provide a command to create a confirm dialog box with the message
Proceed?
,
storing the user's response in the variable
continuePurchase
.
8.
Provide a command to create a prompt dialog box with the message
Enter
Account Number
and the default text
nn-nnn-n
. Store the user's response in the
accountNum
variable.
9.
Create an object collection named
moveable
for elements in the
canMove
class,
and then provide the code to change the mouse cursor style to
move
for every
object in that collection.