Skip to Main Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate content levelBeginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
274
Chapter 4.5
a brief review
60 Second Review
ü The browser represents the HTML, CSS,
and JavaScript that makes up a web page
as a tree full of objects, using the Document
Object Model, or DOM.
ü You can view and change the DOM using
JavaScript code. Changes you make to the
DOM are automatically reflected in the web
page that the browser is displaying.
ü You can use the JavaScript document object
to access the browser’s DOM tree for the
current web page.
ü You can use the DOM from any web
application, not just asynchronous ones.
ü A DOM tree is made up of different types of
nodes: elements nodes, attribute notes, and
text nodes.
ü Element nodes can have only a single
parent. If you change an element’s parent, or
add the element as the child of another node,
you are moving the element in the DOM tree.
ü You can add CSS styles and JavaScript
event handlers to DOM nodes using
JavaScript code.
Check it out for yourself!
The Great Chapter 4 Coding Challenge
Write a killer web application that uses the
Document Object Model to create a dynamic
user interface, without writing any Ajax code.
Remember this? You just built a
slick web app, without a single line of
asynchronous JavaScript. Nice job!
Don’t think we’ve left asynchronous
programming altogether... we’re getting
ready to dive back in as soon as you turn
over to Chapter 5.
you’re on your way 4
275
developing dom apps
function startOve
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

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Head First Ajax

Head First Ajax

Rebecca M. Riordan

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content