Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/466.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 提供特定ie版本的flash版本,其他WSE提供js版本_Javascript - Fatal编程技术网

Javascript 提供特定ie版本的flash版本,其他WSE提供js版本

Javascript 提供特定ie版本的flash版本,其他WSE提供js版本,javascript,Javascript,我用flash和js版本创建了一个动画横幅 是否可以检测低于版本9的ie版本,然后提供flash横幅或js横幅。您可以使用条件注释检测ie版本 <!--[if lt IE 7 ]> <html class="ie6"> <![endif]--> <!--[if IE 7 ]> <html class="ie7"> <![endif]--> <!--[if IE 8 ]> <html class=

我用flash和js版本创建了一个动画横幅


是否可以检测低于版本9的ie版本,然后提供flash横幅或js横幅。

您可以使用条件注释检测ie版本

<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->

例如,您可以将任何内容放入此评论中,它只会在低于IE 9的浏览器中显示

<!--[if lt IE 9 ]> <script src="doOldIEstuff.js"></script> <![endif]-->


我可以把条件注释放在body标签中吗?@Adrian是的,你可以把它们放在任何地方。