我想将javascript和CSS应用于所有浏览器,但不是IE6可能吗?

我想将javascript和CSS应用于所有浏览器,但不是IE6可能吗? 例如,我有一个javascript abc.js 我想在所有浏览器IE7,IE8,IE9,Firefox,Safari,Chrome中使用这个javascript。 但我不想在IE6中使用这个javascript。     
已邀请:
这应该可以使用条件注释的组合。 你必须指定两次,否则,这应该工作:
<!--[if gt IE 6]>
   For Internet Explorer > 6
<![endif]-->

<![if !IE]>
 For all other browsers 
<![endif]>
    
supero将所有其他样式表隐藏在Internet Explorer 6中,将它们包含在此条件注释中。
<!--[if ! lte IE 6]><!-->
/* Stylesheets for browsers other than Internet Explorer 6 */
<!--<![endif]-->
然后添加Universal Internet Explorer 6样式表。
<!--[if lte IE 6]>
<link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection">
<![endif]--> 
    
Andy Clarke在他的Universal IE6 CSS项目中得到了答案。我推荐他的'For a beautiful web'网站上的文章,因为他有一个特定的方法来解决这个问题 - 这可能是也可能不是出于同样的原因,你希望实现这个只有偏袒! 从他的Universal IE6 CSS代码: 要从Internet Explorer 6隐藏所有其他样式表,请将其包装在此条件注释中。
<!--[if ! lte IE 6]><!-->
/* Stylesheets for browsers other than Internet Explorer 6 */
<!--<![endif]-->
然后添加Universal Internet Explorer 6样式表。
<!--[if lte IE 6]>
<link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection">
<![endif]--> 
请参阅下面的完整文章,以及其中的完整代码链接: http://forabeautifulweb.com/blog/about/universal_internet_explorer_6_css     
您可以通过排除IE 6或更低版本来使用条件注释来执行操作。
<![if gt IE 6]>
Markup used by IE 7, 8 and above, and all other browsers ignoring these proprietary tags...
<![endif]>
那是“下层揭示的条件评论”。     

要回复问题请先登录注册