【问题标题】:How to display a message when IE browser is opening?IE浏览器打开时如何显示消息?
【发布时间】:2013-04-17 02:34:41
【问题描述】:

我有一个问题,也许它在这个网站上是重复的,但我找不到它!

我想显示这条消息

"Please open this website in firefox and you can download Mozilla Firefox from here"

当用户在 IE 中打开我的网站时。

怎么做?

提前致谢。

【问题讨论】:

标签: javascript html internet-explorer


【解决方案1】:

你可以使用条件检查

<!--[if IE]>
please open this web in firefox and you can download Mozilla Firefox from <a href='here'>here</a>
<![endif]-->

或者您可以尝试添加 js/编程检查

【讨论】:

    【解决方案2】:

    如果您更喜欢 Javascript,可以查看 userAgent。

    if (navigator.userAgent.indexOf('MSIE')>0) {
        document.write('do something');
    };
    

    MSIE 是 Microsoft Internet Explorer 的指示器

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-25
      • 2021-07-28
      • 2019-04-24
      • 2012-06-25
      • 1970-01-01
      • 1970-01-01
      • 2015-05-04
      • 1970-01-01
      相关资源
      最近更新 更多