The nodeName property is part of the browser's internal DOM management. It contains a value that is the name of the HTML tag that instantiated the object. This is also reflected as the tagName property.
When the object is a Text object, the nodeName value is "#text" because there is no HTML tag to represent plain text and a text node is placed between HTML Element objects. It's like the mortar between the bricks in a wall.
See also: | Element object, Node.nodeName |
Prev | Home | Next |
Element.nextSibling | Up | Element.nodeType |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |