Learn how to:
Use web standards to ensure cross-browser compatibility.
Harness the power of the DOM to create user-controlled animation.
Also includes an introduction to Ajax.
ou might have heard of the Document Object Model. You will almost
technologies are, where they came from, and what they can do for you.
You don’t need to be a programmer to understand DOM Scripting. In fact,
this book is aimed specifically at web designers. Programming concepts are
and the DOM as painlessly as possible. You will build practical, real-world
examples that you can use on your websites. But this book is more than just
the Document Object Model are two very powerful technologies that go
together like peanut butter and jelly, but if they aren’t used with forethought,
the results could be messy. The examples given here will encourage you to
think about DOM Scripting in a responsible, user-centric way.
If you’re already using web standards like CSS and XHTML, you’ll appreciate
the enhancements that DOM Scripting can offer. Just as CSS allows you to
keep your presentation separate from your structure, you can use
messing with your markup or sacrificing usability. This book is your
this print for reference only—size & color not accurate spine = 0.856" 368 page count
Foreword by Dave Shea
6 89253 59533 6
9 781590 595336
Separate behavior from structure using
Add dynamic effects with progressive
Ensure backwards-compatibility through
1. WEB DESIGN
2. WEB DEVELOPMENT
and the Document Object Model
5335FM_final.qxd 15/8/05 11:15 am Page i
Copyright © 2005 by Jeremy Keith
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN (pbk): 1-59059-533-5
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY, 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail email@example.com, or
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail firstname.lastname@example.org, or visit www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or
indirectly by the information contained in this work.
The source code for this book is freely available to readers at www.friendsofed.com
in the Downloads section.
Steve Anglin, Dan Appleman,
Ewan Buckingham, Gary Cornell,
Tony Davis, Jason Gilmore,
Jonathan Hassell, Chris Mills,
Dominic Shakeshaft, Jim Sumser
Copy Edit Manager
Julie M. Smith
Assistant Production Director
Compositor and Artist
Jeremy Keith and Kurt Krames
5335FM_final.qxd 15/8/05 11:15 am Page ii
For Jessica, my wordridden wife.
5335FM_final.qxd 15/8/05 11:15 am Page iii
5335FM_final.qxd 15/8/05 11:15 am Page iv
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额