Weird Thoughts From Eric's Head

Tags - Categories : All | AJAX | BUSINESS | PERSONAL | PROGRAMMING | BOOK REVIEW

Print The DOM Node Tree
A user on one of forums posted this link: http://www.permadi.com/tutorial/domTree/index.html to a tutorial on the DOM Node. The script there is rather interesting to anyone that does not understand the structure of a document.

An example output from the script with IE6 is:

<HTML>
  ¦
  ¦--<HEAD>
  ¦  ¦
  ¦  ¦--<TITLE>
  ¦  ¦   </TITLE>
  ¦   </HEAD>
  ¦
  ¦--<BODY>
  ¦  ¦
  ¦  ¦--<TABLE>
  ¦  ¦  ¦
  ¦  ¦  ¦--<TBODY>
  ¦  ¦  ¦  ¦
  ¦  ¦  ¦  ¦--<TR>
  ¦  ¦  ¦  ¦  ¦
  ¦  ¦  ¦  ¦  ¦--<TD>
  ¦  ¦  ¦  ¦  ¦  ¦
  ¦  ¦  ¦  ¦  ¦  ¦--[unknown tag]
  ¦  ¦  ¦  ¦  ¦  ¦  
  ¦  ¦  ¦  ¦  ¦   </TD>
  ¦  ¦  ¦  ¦   </TR>
  ¦  ¦  ¦  ¦
  ¦  ¦  ¦  ¦--<TR>
  ¦  ¦  ¦  ¦  ¦
  ¦  ¦  ¦  ¦  ¦--<TD>
  ¦  ¦  ¦  ¦  ¦  ¦
  ¦  ¦  ¦  ¦  ¦  ¦--[unknown tag]
  ¦  ¦  ¦  ¦  ¦  ¦  
  ¦  ¦  ¦  ¦  ¦   </TD>
  ¦  ¦  ¦  ¦   </TR>
  ¦  ¦  ¦   </TBODY>
  ¦  ¦   </TABLE>
  ¦   </BODY>
   </HTML>

I guess my geek in me things this is cool.
Hope this helps you out.

Eric Pascarello
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for Dynamic Web Pages




Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 5 + 2 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/pascarello/addTrackBack.action?entry=1116682277719