View Single Post
  #4 (permalink)  
Old 05-13-08, 02:33 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
to access the attributes (such as "class", "style", "id", ....) of a node, you have to use the attributes property of the node:
JavaScript Code:
  1. var mynode = document.getElementsByTagName ("*");
  2. for (var i in mynode.attributes)
  3.   alert (i + "=" + mynode.attributes[i]);
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote