GetAttribute
Most of the introductions only have one, including w3cschool!
In fact, this method has two parameters in iE7!
Found on msdn!
Simply flip it
0 is the default condition and is case insensitive!
1 case sensitive 2 returns a string. I didn't find any difference when adding this! 4. valid only for URLs! For example, the property value is/posetedit/31234, with this parameter will add the domain name, automatically complete the url, into the http://xxx.com//posetedit/31234
Note: These are only for versions earlier than ie7 (including IE7 ).
Source Document: Syntaxobject. getAttribute (strAttributeName, lFlags) Parameters
-
StrAttributeName[In]
-
Type:String
StringThat specifies the name of the attribute.
-
LFlags[In, optional]
-
Type:Integer
IntegerThat specifies one or more of the following flags:
-
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 inStrAttributeNameMust exactly match those in the attribute name.
-
2
-
Returns attribute value asString. This flag does not work for event properties.
-
4
-
Returns attribute value as a fully expanded URL. Only works for URL attributes.
Return value
Type:Variant
VariantThat returnsString,VariantOf typeInteger, OrBooleanValue as defined by the attribute. If the attribute is not present, this method returnsnull
.
Msdn: http://msdn.microsoft.com/en-us/library/ms536429 (VS.85). aspx