IE condition comment judgment statement in HTML (& lt ;! -- [If xx ie x] & gt; & lt ;! [Endif] -- & gt;), xxendif

Source: Internet
Author: User

IE condition comment judgment statement in HTML (<! -- [If xx ie x]> <! [Endif] -->), xxendif
<! -- [If xx ie x]> <! [Endif] --> is a special syntax provided by IE, which is ignored by other browsers as annotations. Purpose: load the corresponding CSS or JS files according to different IE versions, as shown in the following example: (CODE) (Chrome browser) (IE browser) the following column: <! -- [If! IE]> <! --> All except IE can be recognized <! -- <! [Endif] -->
<! -- [If IE]> all IE identifiable <! [Endif] -->
<! -- [If IE 6]> only IE6 can recognize <! [Endif] -->
<! -- [If lt IE 6]> versions earlier than IE6 and IE6 are recognizable <! [Endif] -->
<! -- [If gte IE 6]> IE6 and IE6 and later versions can be recognized <! [Endif] -->
<! -- [If IE 7]> only IE7 is recognizable <! [Endif] -->
<! -- [If lt IE 7]> versions earlier than IE7 and IE7 are recognizable <! [Endif] -->
<! -- [If gte IE 7]> IE7 and IE7 versions can be identified <! [Endif] -->
<! -- [If IE 8]> only IE8 is recognizable <! [Endif] -->
<! -- [If IE 9]> only IE9 can recognize <! [Endif] --> symbol description:

Project Example Description
! [If! IE] The NOT operator. This is placed immediately in front ofFeature,Operator, OrSubexpressionTo reverse the Boolean meaning of the expression.
NOT operator. This is an instant front.Function,Operator, OrSubexpressionReturns the meaning of a Boolean expression.
Lt [If lt ie5.5] The less-than operator. Returns true if the first argument is less than the second argument.
Less than the operator. If the first parameter is smaller than the second parameter, true is returned.
Lte [If lte IE 6] The less-than or equal operator. Returns true if the first argument is less than or equal to the second argument.
Less than or equal to the operation. If the first parameter is smaller than or equal to the second parameter, true is returned.
Gt [If gt IE 5] The greater-than operator. Returns true if the first argument is greater than the second argument.
Greater than the operator. If the first parameter is greater than the second parameter, true is returned.
Gte [If gte IE 7] The greater-than or equal operator. Returns true if the first argument is greater than or equal to the second argument.
Greater than or equal to the operation. If the first parameter is greater than or equal to the second parameter, true is returned.
() [If! (IE 7)] Subexpression operators. Used in conjunction with boolean operators to create more complex expressions.
Operator of the subexpression. Use the Boolean operator to create more complex expressions.
& [If (gt IE 5) & (lt IE 7)] The AND operator. Returns true if all subexpressions evaluate to true
AND operator. Returns true if all the subexpressions are calculated as true.
| [If (IE 6) | (IE 7)] The OR operator. Returns true if any of the subexpressions evaluates to true.
OR operator. Returns true if the subexpression returns true.

Related Article

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.