-
Book Overview & Buying
-
Table Of Contents
Object-Oriented JavaScript - Third Edition
By :
You learned quite a bit in this chapter. You learned the following cross-browser BOM objects:
Properties of the global window object, such as navigator, location, history, frames, screen
Methods such as setInterval() and setTimeout(); alert(), confirm() and prompt(); moveTo/By() and resizeTo/By()
Then, you learned about the DOM, an API to represent an HTML or XML document as a tree structure, where each tag or text is a node on the tree. You also learned how to perform the following actions:
Accessing nodes:
Using parent/child relationship properties, such as parentNode, childNodes, firstChild, lastChild, nextSibling, and previousSibling
Using getElementsById(), getElementsByTagName(), getElementsByName(), and querySelectorAll()
Modifying nodes:
Using innerHTML or innerText/textContent
Using nodeValue or setAttribute(), or just using attributes as object properties
Removing nodes with removeChild() or replaceChild()
Adding new ones with appendChild(), cloneNode(), and insertBefore...
Change the font size
Change margin width
Change background colour