[thelist] What is DOM?

Aleem aleem at mindless.com
Thu Feb 21 18:21:01 CST 2002


Syed,
	In layman's terms... DOM as you probably know it stands for
Document Object Model. Imagine if you could pinpoint everything inside a
document. If you could selectively pick out the 3rd character in the 4th
paragraph and make it a different color. Or pick out th first HR
(Horizontal Rule) after the 6th image...

Basically you can break up a document into it's smallest parts and each
of these parts is an object. For example, say the first image in your
document is that of a circle, and you wanted to change it to a square.
You would do something like this:

<script language="javascript">
	document.images[0].src='square.gif';
</script>


or if you declare a name for your image:

<img src="circle.gif" name="circle">

then you could have:

document.images['circle'].src='square.gif';


DOM is essentially intended for use with JavaScript. DHTML is a
combination of DOM, Javascript and HTML. The DOM allows you to pick out
the objects, the javascript allows you to do stuff with them (animate or
whatever) and the HTML ofcourse renders the page.


Hope this help!

-aleem




> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org] On Behalf Of Syed
> Zeeshan Haider
> Sent: February 20, 2002 6:09 PM
> To: Evolt
> Subject: [thelist] What is DOM?
>
>
> Hello Experts,
> I have read about DOM at many places but too much complex
> technical language has always been an obstacle in my way to
> learn about DOM. Can somebody tell me what DOM really is? How
> can it be important for web development? To which extent is
> it necessary for web developer to learn about DOM? Thank you,
> Syed Zeeshan Haider. http://syedzeeshanhaider.faithweb.com/
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list