Previous Topic:forwardNext Topic:getAttribute
Retrieves the value of the given attribute.
Parameter Description 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.
Returns a string, number, or Boolean value as defined by the attribute. If the attribute is not present, this method returns null.
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.
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
Top of Page
分享于 2011-03-21 14:01:00