asp.net.ph

Skip Navigation Links

getAttribute Method

DHTML Methods


Retrieves the value of the specified attribute.

Syntax

vAttrValue = object.getAttribute ( sAttrName [ , iFlags ] ) 
Parameters

sAttrName Required. Name of the attribute.
iFlags Optional. One or more of the following flags may be specified:

0 Default. Performs a property search that is not case-sensitive and returns an interpolated value if the property is found.
1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must match exactly those in the attribute name. If the iFlags parameter for setAttribute is set to true and this option is set to 0 ( default ) , a conflict will arise.
2 Returns the value exactly as it was set in client-side script or in the source document.


Return Value

Variant. Returns a string, number, or Boolean value as defined by the attribute. If the attribute is not present, this method returns null.

Remarks

If two or more attributes have the same name ( differing only in uppercase and lowercase letters ) and iFlags is 0, this method retrieves values only for the last attribute to be created with this name. All other attributes of the same name are ignored.

See Also

setAttribute



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note