admin管理员组文章数量:1391975
It seems like a silly question, but I'm stumped.
I'm using an if IE conditional statement to fix some issues in IE6.
In the head, I have
<!--[if lt IE 7] > <script type="text/javascript" src="js/ie6.js"></script> < ![endif]-->
And in the ie6.js file, I have a simple alert, which works when I take it out of the conditional ment. But in IE, the alert does not show. I am testing on IE 6.0.2900 on Windows XP in Parallels Desktop.
It seems like a silly question, but I'm stumped.
I'm using an if IE conditional statement to fix some issues in IE6.
In the head, I have
<!--[if lt IE 7] > <script type="text/javascript" src="js/ie6.js"></script> < ![endif]-->
And in the ie6.js file, I have a simple alert, which works when I take it out of the conditional ment. But in IE, the alert does not show. I am testing on IE 6.0.2900 on Windows XP in Parallels Desktop.
Share Improve this question edited Aug 26, 2010 at 14:23 Gian 14k49 silver badges54 bronze badges asked Aug 26, 2010 at 14:19 Mike EngMike Eng 1,6915 gold badges36 silver badges56 bronze badges 1- Have you tried displaying the browser information in javascript to make sure it is IE6? Wonder if the VM is choosing a different version of installed IE. – Jay Commented Aug 26, 2010 at 14:28
1 Answer
Reset to default 7Try it without spaces in the tags:
<!--[if lt IE 7]>
According to the conditional ment this is Internet Explorer lower than 7
<![endif]-->
本文标签: javascriptif IE conditional comments not workingStack Overflow
版权声明:本文标题:javascript - if IE conditional comments not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744734753a2622258.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论