Why using this HTML page on Internet Explorer 8:
<p>
<!--[if IE]> According to the conditional comment this is Internet Explorer<br /><! [endif]-->
<!--[if IE 5]> According to the conditional comment this is Internet Explorer 5<br /> <![endif]-->
<!--[if IE 5.0]> According to the conditional comment this is Internet Explorer 5.0<br /> <![endif]-->
<!--[if IE 5.5]> According to the conditional comment this is Internet Explorer 5.5<br /> <![endif]-->
<!--[if IE 6]> According to the conditional comment this is Internet Explorer 6<br /> <![endif]-->
<!--[if IE 7]> According to the conditional comment this is Internet开发者_高级运维 Explorer 7<br /> <![endif]-->
<!--[if gte IE 5]> According to the conditional comment this is Internet Explorer 5 and up<br /><![endif]-->
<!--[if lt IE 6]> According to the conditional comment this is Internet Explorer lower than 6<br /> <![endif]-->
<!--[if lte IE 5.5]> According to the conditional comment this is Internet Explorer lower or equal to 5.5<br /> <![endif]-->
<!--[if gt IE 6]> According to the conditional comment this is Internet Explorer greater than 6<br /> <![endif]-->
</p>
I get this result?
According to the conditional comment this is Internet Explorer
According to the conditional comment this is Internet Explorer 7
According to the conditional comment this is Internet Explorer 5 and up
According to the conditional comment this is Internet Explorer greater than 6
Shouldn't I get IE8?
Thanks.
The only comment that appears incorrect it
According to the conditional comment this is Internet Explorer 7
Is the browser in compatibility mode as this would render as IE7
For local documents, IE8 tends to automatically use the IE7 Compatibility Mode. In that case, IE8 acts as if it was IE7 (with a few quirks).
You’re either testing this locally, or your browser is currently set in IE7 Compatibility Mode.
精彩评论