Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Use JavaScript and the DOM to Create Dynamic Web Pages : Page 6

The Document Object Model (DOM) gives you access to all the elements on a web page. Using JavaScript, you can create, modify and remove these elements in the page dynamically.


advertisement

10.6 Summary of the DOM Objects and Collections

As you've seen in the preceding sections, the objects and collections in the W3C DOM give you flexibility in manipulating the elements of a web page. We've shown how to access the objects in a page, how to access the objects in a collection, and how to change element styles dynamically.

The W3C DOM allows you to access every element in an XHTML document. Each element in a document is represented by a separate object. The diagram in Fig. 10.6 shows many of the important objects and collections provided by the W3C DOM. Figure 10.7 provides a brief description of each object and collection in Fig. 10.6.

Click to enlarge

Fig. 10.6



W3C Document Object Model.

Click to enlarge

Fig. 10.7

Objects and collections in the W3C Document Object Model.

For a complete reference on the W3C Document Object Model, see the DOM Level 3 recommendation from the W3C at http://www.w3.org/TR/DOM-Level-3-Core/. The DOM Level 2 HTML Specification (the most recent HTML DOM standard), available at http://www.w3.org/TR/DOM-Level-2-HTML/, describes additional DOM functionality specific to HTML, such as objects for various types of XHTML elements. Keep in mind that not all web browsers implement all features included in the specification.


© Copyright Pearson Education. All rights reserved.



Paul J. Deitel, Chief Technical Officer of Deitel & Associates, Inc., has delivered Internet and World Wide Web courses and programming language classes for industry clients including Sun Microsystems, EMC2, and IBM. He studied Information Technology at the Massachusetts Institute of Technology's Sloan School of Management. He and his father, Dr. Harvey M. Deitel, are the world's best-selling Computer Science textbook authors.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap