Availability
DOM Level 1 Core
Synopsis
Attr getAttributeNode(String name);
Arguments
name
The name of the desired attribute.
Returns
An Attr node whose descendants represent the value of the named
attribute, or null if this element has no such
attribute.
Description
getAttributeNode( ) returns an Attr node that
represents the value of a named attribute. Note that this Attr node
can also be obtained through the attributes
property inherited from the Node interface.
The attribute value is represented by the descendants of the Attr
nodes. In HTML documents, an Attr node has a single Text node child,
and it is always easier to query an attribute value by calling
getAttribute( ), which returns the value as a
string. getAttributeNode( ) is necessary only when
you are working with XML documents that contain entity references in
their attribute values.
See Also
Element.getAttribute( ), Element.getAttributeNodeNS( ),
Node.attributes
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.