
上QQ阅读APP看书,第一时间看更新
Chapter 2. Switching Paddles Midstream: Changing HTML After Page Load
The Web 2.0 movement got into full swing as developers everywhere learned that users were human and desired ergonomic, friendly interfaces. You will find in this chapter ideas on:
- Finding and collecting elements in the DOM
- Adding and removing elements in the DOM
- Introducing new and styling existing elements in the DOM
The HTML DOM is a tree of tags. The root of the tree is the <html></html>
tag itself. All tags within this tree belong to it; furthermore, tags within those tags belong to those tags.
Note
We are all comfortable with viewing the source of an HTML document. Please note that any changes to the HTML after a page loads will not be apparent when viewing the source.