2013-02-27 111 views
0
<!--[if IE 7]> 
    <script type="text/javascript"> 
    window.location = "BrowserErrorPage.php"; 
    </script> 
<![endif]--> 

我已经设法找出它的IE7然后重定向到somepage。如果我想要的东西,像我想重定向如果IE浏览器版本低于IE版本8浏览器版本重定向

+0

dup:http://stackoverflow.com/questions/3541982/apply-css-rules-if-browser-is-ie和:http://stackoverflow.com/questions/567561/how-doi-i- do-ie-conditionals-in-css – jchapa 2013-02-27 20:44:19

回答

2
<!--[if lt IE 8]> 
    <script type="text/javascript"> 
    window.location = "BrowserErrorPage.php"; 
    </script> 
<![endif]--> 

如需进一步信息,以错误页面的内容:Conditional comments

0
<!--[if lt IE 8]> 
    <script type="text/javascript"> 
    window.location = "BrowserErrorPage.php"; 
    </script> 
<![endif]--> 

条件注释是一个可怕的想法,但这里是如何工作的。

+0

为什么这是一个可怕的想法。如果是的话什么是最好的解决方案 – 2013-03-07 22:41:09