Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Retrieves the value of the specified attribute.
Syntax
vAttrValue = object .getAttribute( sAttrName [ , iFlags ] )Parameters
sAttrName | Required. String that specifies the name of the attribute. | ||||||
iFlags | Optional. Integer that specifies one or more of the following flags:
|
Return Value
Variant that 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 , the getAttribute method retrieves values only for the last attribute created with this name, and ignores all other attributes with the same name.
When retrieving the CLASS attribute using this method, set the sAttrName to be "className" , which is the corresponding Dynamic HTML (DHTML) property.
This method is used only by events created from HTML Components.
Standards Information
This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
|
A , ADDRESS , APPLET , AREA , B , BASE , BASEFONT , BGSOUND , BIG , BLOCKQUOTE , BODY , BR , BUTTON , CAPTION , CENTER , CITE , CODE , COL , COLGROUP , COMMENT , currentStyle , CUSTOM , DD , DFN , DIR , DIV , DL , DT , EM , EMBED , FIELDSET , FONT , FORM , FRAME , FRAMESET , HEAD , hn , HR , HTML , I , IFRAME , IMG , INPUT type=button , INPUT type=checkbox , INPUT type=file , INPUT type=hidden , INPUT type=image , INPUT type=password , INPUT type=radio , INPUT type=reset , INPUT type=submit , INPUT type=text , KBD , LABEL , LEGEND , LI , LINK , LISTING , MAP , MARQUEE , MENU , META , nextID , NOBR , OBJECT , OL , OPTION , P , PLAINTEXT , PRE , runtimeStyle , 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 |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |