GetAttribute for IE7

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.