Why are conditional comments in HTML not recognized in Internet Explorer 11? Is it not supported now?

假如想象 提交于 2019-12-11 11:03:57

问题


I want to display different content on different browsers. I used Internet Explorer 11 and Google Chrome 39. But, in Internet Explorer and all other browsers "Not Internet Explorer" is displayed. Is something wrong with the code? I saw the following code as an answer to one of the same question , then why it is not working now?

code:

<!DOCTYPE html>
<html>
<body>

<!--[if (IE)]><p>This is Internet Explorer</p><![endif]-->

<!--[if !(IE)]><!--> Not Internet Explorer <!--<![endif]-->

</body>
</html>

回答1:


Microsoft dropped conditional comments in Internet Explorer as of version 10.



来源:https://stackoverflow.com/questions/27735840/why-are-conditional-comments-in-html-not-recognized-in-internet-explorer-11-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!