【发布时间】:2013-09-04 17:53:45
【问题描述】:
我需要检查 ie 6 是否在本地加载所有 js 文件,或者其他更高或不同的文件,即 chrome 等,然后从 cdn(google 或任何其他)加载
我已经在为样式使用条件 cmets
<!--[if lte IE 6]>
<link href="Content/themes/bootstrap/css/bootstrap-ie6.css" rel="stylesheet" />
<link href="Content/Site-ie6.css" rel="stylesheet" />
<![endif]-->
但我知道我们有很多用户使用 ie6,所有这些用户都在同一个位置,需要从站点而不是 cdn 加载 js 文件。因此,如果 ie6 从本地站点加载 js 文件,则从 cdn 加载其他任何内容。
我该怎么做?
下面的工作:
类似于:(How do I make an "else" in an IE HTML conditional?)
<!--[if lte IE 6]>
You're using IE 6!
<![endif]-->
<![if ! lte IE 6]>
You're using something else!
<![endif]>
谢谢
【问题讨论】:
-
我认为
<!--[if gt IE 6]><!-->Something else<!--<![endif]-->会起作用。我不确定! lte IE 6语法是否正确。这个wiki link 中有一些示例。最后,我完全同意以下评论和 duffymo 的回答。 -
请用户现代化
-
我确实有 。但老实说,我什至没有检查过它的来源或作用。同样,如果它是一个 CDN,那么它不会为这些特定的 ie6 用户工作。 ie6 用户有防火墙阻止访问我的站点以外的所有内容。这是无法更改的。
标签: javascript asp.net css coding-style