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
226
Chapter 4
A new type of tree: the DOM tree
head
title
“Binary Tree
Selection”
p
“Below are two
binary tree
options:”
div
“depth-rst”
“ trees are
great for
folks that
are far away.”
“Our “
em
These are text
node objects.
Although this doesn’t look much like a tree
anymore, you can still see the root, branches,
and leaves, just like on page 225.
Once the browser has your markup with the <html> element at
the top, it creates a new object for each node in the tree. The result
is a bunch of objects, all “connected” together, like you see here:
We’ve ditched the tree image... we gure
you’ve got the idea by now.
dom trees up close
you’re on your way
227
the document object model
html
body
“Main Menu”
<html> is the root
element of the
DOM tree.
All of these objects
are element nodes,
because they represent
HTML elements.
This entire thing is usually called a
DOM tree, because it represents your
document using objects and provides a
tree model of your markup.
Order is still preserved, as
elements and text appear in
exactly the same order as
they do in the HTML markup.
div
p
em
“Our “
“breadth-rst”
a
“ trees are
a favorite
for nearby
neighbors.”
“You can
view other
products in
the ”
“.“
228
Chapter 4
Time to get your d ...
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