-
Book Overview & Buying
-
Table Of Contents
YUI 2.8: Learning the Library
You may have worked with the DOM and not even realized it; for example if you've ever used getElementById or getElementsByTagName (two common methods), then you have worked with the DOM.
The first of the above two methods returns the element that has a matching id attribute from the document. The second method returns an array of elements of a specific type such as an <img>.
In a nutshell, the DOM gives you access to the structure and content of a web page (or XML document), and allows you to make modifications to either using almost any common scripting or web programming language around.
Most of you, I'm sure, would have at least come across these two basic DOM methods and understood the concepts behind their use. I would be surprised if a high percentage of you have not used them frequently.
Each of the DOM level recommendations defined by the W3C have been designed to promote interoperability between different platforms and to be language independent...
Change the font size
Change margin width
Change background colour