Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Book/Chapter 6/

About

 

Part I - HTML and Scripting
Overview of HTML and CSS
Fundamentals of HTML Scripting
Dynamic HTML Event Model
Programming the Browser Window
Window and Frame Management

 
Part II - Document Structure
The HTML Document
Programming Element Collections
Scripts and Elements
Scripting Individual Elements
Forms and Intrinsic Controls
 

Part III - Dynamic Styles and Animation
Dynamic Styles
Dynamic Positioning

 

Part IV - Dynamic Content
Dynamic Content
User Selection and Editing
Data Binding with HTML

 


Inside Dynamic HTML

Inside Dynamic HTML Book Cover

Order Now
from
Amazon.com

Inside Dynamic HTML
Microsoft Programmers Series

The structure, contents, and style of an HTML document are exposed through the document property on the window. The document property returns an object that encapsulates all the information about the document. The document object is the most important and powerful object of the Dynamic HTML object model. Through this object, all elements contained in the document can fire events and can be accessed and modified by scripts, allowing you to create a dynamic document.

The document object's collections and the corresponding HTML elements.

The elements in the HTML document are exposed through a set of collections on the document object. The contents of the document are accessible through these elements and through a textRange object. Both techniques allow you to access and change the contents. The style of the document is exposed through the stylesheets collection.

Our discussion of these issues will span several chapters. This chapter begins the discussion by covering the following topics:

  • Referencing the document object

    The document object is a property of the window. This section shows you how to access the HTML document contained within the current window as well as documents displayed in other windows.

  • Changing the Document's Colors

    The document object exposes properties for manipulating the color of the text and background on the page. These properties are compatible with the existing object model implementations in Netscape Navigator and Microsoft Internet Explorer 3.0.

    The Color SelectorIE4 Demo is a simple demonstration of the document's color properties.

  • Accessing meta information about the document

  • Modifying the HTML stream

    The document object exposes methods for manipulating the HTML stream while the page is loading. These methods work only while a page is rendering and are not used to modify a page once it is loaded-separate objects and methods are exposed for this purpose.

© 1997-98 InsideDHTML.com, LLC. All rights reserved.