How to write one IE conditional comment to target all IE versions at once?
问题 I want to use a JavaScript only for all IE version 6,7 and 8. 回答1: Nested conditions ( WRONG ): <!--[if lte IE 8]> <!--[if gte IE 6]> <!-- your stuff here --> <![endif]--> <![endif]--> EDIT: As Martha highlighted, nested condition don't work, use " & ": <!--[if (lte IE 8) & (gte IE 6)]> <!-- your stuff here --> <![endif]--> Other examples from MSDN: <!--[if IE]><p>You are using Internet Explorer.</p><![endif]--> <![if !IE]><p>You are not using Internet Explorer.</p><![endif]> <!--[if IE 7]><p