Section 25.100. Element.hasAttribute( ): determine whether this element has a specified attribute


25.100. Element.hasAttribute( ): determine whether this element has a specified attribute

DOM Level 2 Core:

25.100.1. Synopsis

 boolean hasAttribute(String name); 

25.100.1.1. Arguments

name

The name of the desired attribute.

25.100.1.2. Returns

true if this element has a specified or default value for the named attribute, and false otherwise.

25.100.2. Description

This method determines whether an element has an attribute with the specified name but does not return the value of that attribute. Note that hasAttribute( ) returns true if the named attribute is explicitly specified in the document and also if the named attribute has a default value specified by the internal subset of the document type.

25.100.3. See Also

Element.getAttribute( ), Element.setAttribute( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net