Skip to Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
you’re on your way
225
the document object model
Browsers see the world upside down
Of course, browsers don’t literally store a picture of a tree with your markup on
it. If you want to really understand what the browser stores in memory, you need
to learn about the DOM. Let’s see how the browser takes the tree you just looked
at and represents it with objects.
First, the browser ips the entire tree upside down so the <html> element is at
the top of the tree instead of the bottom:
html
“Below are our ne
binary tree options:”
p
p
“Binary Tree Selection”
title
“You can view other
products in the “
“Main Menu”
a
“.”
“depth-rst”
“breadth-rst”
“ trees are great for folks
that are far away.”
em
em
“ trees are a favorite for
nearby neighbors.”
“Our “
“Our “
div
div
head
body
When you’re working with the DOM,
the “top” of the tree is the root
element. In a web page, that’s <html>.
With this “top-down” view
of the HTML, you can see
a node’s parent element,
and any child nodes, easily.
parent
child
Here’s the text in the second
<div>, broken up into several text
nodes to keep the emphasized
word in the right place.
Even though we
ipped the tree over,
we still move from
left-to-right when
we order nodes.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content