Professional Documents
Culture Documents
JavaScript The Web Warrior Series 6th Edition Vodnik Solutions Manual 1
JavaScript The Web Warrior Series 6th Edition Vodnik Solutions Manual 1
Short Quiz 1
1. What is the Window object?
The top-level object in the browser object model is the Window object, which represents a web
browser window. The Window object is called the global object because all other objects in the
The Document object branch of the browser object model is represented by its own object
model called the Document Object Model, or DOM. Unlike the BOM, which is a loose standard,
the DOM is a formal specification of the World Wide Web Consortium (W3C), like HTML and
CSS.
3. What is the difference between the Window object and the Document object? What is
between them through a specification called the browser object model (BOM). One part of the
BOM, the Document object, represents the contents of a document within the browser. Because
the Document object is where many of the changes happen in a dynamic web page, this object
has its own object model, known as the document object model (DOM).
2. What statement would you use to create a variable named firstPriority and assign
3. What statement would you use to create a variable named language and assign as its
4. What statement would you use to change the value of the lang attribute of the html
document.getElementsByTagName("html")[0].lang = language;
Short Quiz 3
1. What statement creates a new footer element?
document.createElement("footer");
2. Name two methods you can use to add a node to the DOM tree, and explain the
appendChild()
insertBefore()
A node added with appendChild() is always appended after any existing child nodes.
The insertBefore() method allows you to specify the order of the inserted node
drive.cloneNode(true);
drive.cloneNode(false);
The true argument indicates that the cloned node should include any child nodes of the
specified node, while the false argument indicates that only the specified parent node
should be cloned.
Short Quiz 4
1. What statement do you use to create a new, blank window?
window.open();
2. What happens if your apps include JavaScript code that opens a new window or tab
3. What extra step do you need to take in code to create a new window if you want to be
able to control the new window from the window that created it?
If you want to control the new window by using JavaScript code located within the web browser
in which it was created, then you must assign the new Window object created with the
window.open() method to a variable.
Short Quiz 5
1. Provide two statements that display the previous page in the browser history.
history.back();
history.go(-1);
This statement forces the current web page to reload from the server where it is located, even if
3. What types of information can you access using the Screen object?
The Screen object is used to obtain information about the display screen’s size, resolution, and
color depth.
Review Questions
1. Which of the following objects is also referred to as the global object?
a. Browser object
b. Screen object
c. Document object
d. Window object
2. In the browser object model, the History object is a _______ object to the Location
object.
a. parent
b. grandparent
c. sibling
d. child
a. node
b. document
c. object
d. element
4. Which of the following is the correct syntax for accessing an element with the id value
headline?
a. document.getElementsByID("headline")
b. document.getElementById("headline")
c. document.getElementByID("headline")
d. document.getElementById(headline)
5. Which of the following is the correct syntax for using the getElementsByTagName()
a. document.getElementsByTagName("<p>")
b. document.getElementsByTagName("p")
c. document.getElementsByTagName(<p>)
Another document from Scribd.com that is
random and unrelated content:
Grizzel Grimme, Ballad of, 246
Grose, Francis, 121, 176-177, 265, 268
Guthrie, William, 48
Guy Mannering, 104
Halleaths, 182
Hallowe’en, 248
Hamilton, Charlotte, 256
Hamilton, Gavin, 72, 76, 78, 87-88, 90, 92-93, 142, 202
Hamilton, John, of Sundrum, 85-86
Hamilton, William, of Gilbertfield, 24, 45
Hamlet, 40
Hampstead Heath, 244
Handsome Nell, 236, 242
Hannibal, 45, 234
Hanover, House of, 4, 26, 287-289, 294
Hardyknute, 27, 43
Harry, Blind, 25, 45
Hastings, Warren, 5, 302
Hay, Charles (Lord Newton), 106-107, 108, 253
Hay, Lewis, 161
Health, Burns’s, 54, 83-84, 184-187, 217, 231-233
Helenore (Alexander Ross), 24
Henley, William Ernest, 138, 144, 145, 168
Henri, Susan Dunlop, 152, 286
Henry VIII, 40
Henryson, Robert, 23
Herald’s Office, Edinburgh, 35
Herd, David, 27, 43, 110, 252
‘Here is the glen and here the bower,’ 272
Heron, Lady Elizabeth, 271-272
Heron, Patrick, of Heron, 16, 131, 230, 271
Hey, Johnie Cope, 26
Hey tutti taitie, 272, 300
Highland clans, suppression of, 4
Highland Lassie, 145
Highland Mary. See Campbell, Mary
Highland tours, Burns’s, 116-118, 256
Hildebroad, John, 283
Hill, Peter, 106, 200, 281
History of Sir William Wallace, The, 234
History of the Bible (Stackhouse), 48
Hogg, James, 102, 135
Holinshed, Raphael, 261
Holmes, Oliver Wendell, 19, 280
Holy Fair, The, 76, 248
Holy Willie’s Prayer, 46, 76, 111, 249, 250, 307
Home, John, 21, 28, 40, 42, 75
Homer, 49, 75
Hopetoun, James Hope, Earl of, 228
Horace, 236
Housman, A. E., 244-245
‘How are Thy servants blest’ (Addison), 40
Hume, David, 29, 31, 197, 278, 279, 300, 304
Humphry, James, 83
Hutcheson, Francis, 20, 22, 281, 285
Hyslop, William, 120
Lake District, 47
Lamb, Charles, 278
Lament for James, Earl of Glencairn, 240
Landor, Walter Savage, 250
Lapraik, John, 249
Lapraik, Tod, 305
Laurie, Annie, 250
Laurie, Sir Robert, 121-122
Lawrie, George, 99, 195
Lawrie, Mrs. George, 153
Leader Haughs and Yarrow, 255
Leeward Islands, 176
Lewars, Jessie, 130, 148, 149, 277
Lewars, John, 130, 295
Lewis Gordon, 272
Letters, Burns’s, 60-61
Letters Moral and Entertaining (E. Rowe), 60
Linlithgow, 90
Lippo Lippi, Fra, 250
Lisbon, 9
Little, Jenny, 158-159
Livingstone, David, 303
Lochaber, 256
Lochiel, Donald Cameron of, 301
Lochlie, 62-63, 70, 72-73, 74, 84-88, 90, 138, 208, 214
Lochmaben, 182
Lochmaben Harper, The, 258
Locke, John, 22
Lockerbie, 182
Lockhart, John Gibson, 118
Logan Braes, 299
Lomond, Loch, 47
London, 204, 287, 293, 295
Longtown, 204
Lorimer, Jean, 148, 149, 219
Lorimer, William, 219
Loudoun, 99, 153, 195
Louis XVI, 160, 292, 294, 298
Lounger, The, 31, 302
Lowell, James Russell, 247
Loyal Natives Club, Dumfries, 126-127
M’Auley, John, 151
Macbeth, 261, 266
Mackenzie, Henry, 12, 31, 58, 60, 66, 75, 84, 93, 118, 125, 197, 199,
201, 251, 252, 301, 305
Mackenzie, John, 90-92, 99
Mackenzie, S. (Dumfries), 124
Mackintosh, James, 292
McKnight, —, 274
‘Maclaren, Ian.’ See Watson, John
M’Lehose, Agnes, 70, 114, 125, 144, 148, 152, 153, 156, 160-172,
174, 176, 179, 209, 210, 212, 221, 251, 258, 281, 283, 284, 307
M’Lehose, James, 162, 166, 171, 172
M’Lure, David, 62, 70, 72, 85-88
M’Murdo, John, 111, 133
Macpherson, James, 27, 43
M’Pherson’s Farewell, 264, 307
Mallet, David, 30
Man of Feeling, The, 31, 35, 58, 60, 84, 144, 189, 279, 299, 306
Man Was Made to Mourn, 236
Manners, Burns’s, 102-104, 144, 153-157
Manual of Religious Belief (William Burnes), 59, 279
Marie Antoinette, 160, 298
Marischal, George Keith, 10th Earl of, 36
Marriage, Burns’s, 168-176, 189
Marrow of Modern Divinity, The, 281
Marxism, 18
Mary Morison, 251
Mary, Queen of Scots, 300-301
Masons. See Freemasonry
Massachusetts, 16, 20
Masson, Arthur, 40, 41-42, 58, 60
Mathieson, W. L., quoted, 18-19
Mauchline, 67, 75, 83, 89, 90, 93, 124, 138, 150, 165, 166, 170, 173,
174, 195, 212
Mauchline Wedding, The, 240
Maule, Ramsay, of Panmure, 127
Maxwell, James, 133, 294, 298
Maxwell, Robert, 111
Melrose, 266
Merry Muses of Caledonia, The, 111-112, 253-254
Mill, Mill O, The, 242
Mill Street, Dumfries, 133, 222
Millan, —, 30
Miller, Eliza, 13, 145
Miller, Patrick, 101, 114, 120, 133, 202, 207-212, 220
Miller, Mrs. Patrick, 220
Miller, Patrick, Jr., 206
Milne, A. A., 307
Milton, John, 42, 164, 244, 282
Minstrel, The (Beattie), 25, 29
Mirror, The, 31, 302
Mississippi Bubble, 7
Mitchell, John, 111, 217, 218
Moderates. See New Lights
Moffat, 228
Monboddo, James Burnet, Lord, 108
Monkland Friendly Society, 106, 281
Monody on a Lady Famed for her Caprice, 181-182
Montgomerie, Margaret, 103
Montrose, 117
Montrose, James Graham, Marquis of, 303
Moodie, Alexander, 76
Moore, John, 78, 104, 199, 201, 252
Morison, Mary, 68
Mossgiel, 13, 73-74, 87-88, 95, 138, 143, 167, 190, 202, 204, 208,
211, 214
Mound, Edinburgh, 8
Mount Oliphant, 34, 41, 48, 50, 54-56, 59, 61-62, 70, 72, 208, 220,
279
Muir, Robert, 150, 198, 284
Muir, Thomas, 293, 294
Muir, Mrs. William, 165
Mundell, James, 120
Munro, Neil, 305
Murdoch, John, 34-35, 39-43, 44, 47, 48, 49, 51-55, 57, 204
Murray, Sir James, 272
Murray, John, of Broughton, 4, 30
Murry, John Middleton, 250
Music, Scottish, 26-28, 40, 120-121
Music, influence on Burns, 236-237, 240-244, 246, 248
‘My father was a farmer,’ 236
‘My Love is like a red red rose,’ 26, 107, 261
Versailles, 100
Vicar of Wakefield, The, 31
Virgil, 252, 276
Vocabulary, Burns’s, 247
Voltaire, 300
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation
makes no representations concerning the copyright status of any
work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™
work in a format other than “Plain Vanilla ASCII” or other format
used in the official version posted on the official Project
Gutenberg™ website (www.gutenberg.org), you must, at no
additional cost, fee or expense to the user, provide a copy, a means
of exporting a copy, or a means of obtaining a copy upon request, of
the work in its original “Plain Vanilla ASCII” or other form. Any
alternate format must include the full Project Gutenberg™ License
as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the method
you already use to calculate your applicable taxes. The fee is owed
to the owner of the Project Gutenberg™ trademark, but he has
agreed to donate royalties under this paragraph to the Project
Gutenberg Literary Archive Foundation. Royalty payments must be
paid within 60 days following each date on which you prepare (or
are legally required to prepare) your periodic tax returns. Royalty
payments should be clearly marked as such and sent to the Project
Gutenberg Literary Archive Foundation at the address specified in
Section 4, “Information about donations to the Project Gutenberg
Literary Archive Foundation.”
• You provide a full refund of any money paid by a user who notifies
you in writing (or by e-mail) within 30 days of receipt that s/he does
not agree to the terms of the full Project Gutenberg™ License. You
must require such a user to return or destroy all copies of the works
possessed in a physical medium and discontinue all use of and all
access to other copies of Project Gutenberg™ works.
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES
OF MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.