Murach's JavaScript and DOM Scripting
Basic DOM scripting

This chapter builds on the elementary DOM scripting skills taught earlier in this book to get you started developing more complex applications. Specifically, it teaches you how to work with the common DOM objects, how to use cross-browser techniques for working with the event object, and how to use timers in your applications.

Chapter 13 Basic DOM scripting
How to work with DOM nodes 422
An introduction to DOM nodes 422
Types of DOM nodes 424
The Node interface 426
The Document interface 428
The Element interface 430
The Attr interface 432
How to work with DOM HTML nodes 434
Types of HTMLElement nodes 434
The HTMLElement interface 436
The HTMLAnchorElement interface 436
The HTMLImageElement interface 436
The HTMLButtonElement interface 438
The HTMLInputElement interface 438
Other DOM scripting skills 440
How to cancel the default action of an event 440
How to create image rollovers 442
How to preload images 444
The Image Gallery application 446
The XHTML file 446
The JavaScript files 448
How to use timers 452
How to call a function once 452
How to call a function repeatedly 454
The Slide Show application 456
The XHTML file 456
The CSS file 456
The JavaScript files 458




Murach's JavaScript and DOM Scripting

Learn more about this book

View the table of contents


More about the eBook



Our 100% Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a prompt refund...no questions asked.