Internet explorer 为更好的组织在哪里放置IE条件语句?

Internet explorer 为更好的组织在哪里放置IE条件语句?,internet-explorer,cross-browser,structure,conditional-statements,Internet Explorer,Cross Browser,Structure,Conditional Statements,我正在为IE8和IE9使用以下IE兼容性。很好,它工作得很好,但是你可以看到很长时间,对吗 因此,我想将其作为外部链接或任何其他解决方案插入到文件中。您可以将此代码放置在何处,以便它不会在标题上打扰您 <!-- IE compatibility --> <!--[if lt IE 8]> <script> document.createElement('header'); docum

我正在为IE8和IE9使用以下IE兼容性。很好,它工作得很好,但是你可以看到很长时间,对吗

因此,我想将其作为外部链接或任何其他解决方案插入到文件中。您可以将此代码放置在何处,以便它不会在标题上打扰您

<!-- IE compatibility -->
            <!--[if lt IE 8]>
       <script>
          document.createElement('header');
          document.createElement('nav');
          document.createElement('section');
          document.createElement('article');
          document.createElement('aside');
          document.createElement('footer');
       </script>
    <![endif]-->

            <!--[if lt IE 9]>
       <script>
          document.createElement('header');
          document.createElement('nav');
          document.createElement('section');
          document.createElement('article');
          document.createElement('aside');
          document.createElement('footer');
       </script>
    <![endif]-->


为什么不直接使用第二个块?任何小于IE8的东西也小于IE9。@BoltClock我不明白你的意思,你能解释一下吗。。首先,我使用IE条件句。我想你的意思是,代码影响IE9,对吗?因此,我不需要为IE8和更少的其他代码。您或其他人能告诉我如何正确或更好地存储IE吗?我发现它在头部旁边很有攻击性……是的,这就是
lt IE 9
的意思,所以你不需要第一个块。@BoltClock有没有任何关于如何将其放置为例如外部链接的提示?因此,我的头上没有那么长的代码。谢谢