getAttributegetAttribute*
*



Contents  *



Index  *Topic Contents
*Previous Topic: forward
*Next Topic: getAttribute

getAttribute

Description

Retrieves the value of the given attribute.

Syntax

variant = object.getAttribute(attrName [, iFlags])

ParameterDescription
attrName String specifying the name of the attribute.
iFlags Optional. A combination of the following flags: 1 indicates that a case-sensitive search should be used to locate the attribute. 2 indicates that the value should be returned as it was specified in the source. 0 (default) indicates that the search should be case-insensitive, and that the returned value may be interpolated.

Return Value

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 caseSensitive is FALSE, this method retrieves values only for the last attribute (the last to be created with this name). All other attributes of the same name are ignored.

If iFlags is set to 1, the uppercase and lowercase letters in attrName must match exactly those in the attribute name. If the caseSensitive parameter for the setAttribute method is set to true and this option is set to false (default), a conflict will arise.

Applies To

A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, META, NEXTID, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR, XMP, style


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.