问题
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