如何通知用户Web应用程序不支持IE6 [英] How to inform users that webapplication does not support IE6

查看:70
本文介绍了如何通知用户Web应用程序不支持IE6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Web应用程序,并且我不太在意IE6用户.但是,我希望具有某种功能,该功能可以通知用户他们正在使用IE6,并且不支持其浏览器.我在考虑两种可能的解决方案:

I have web application and I do not really care about IE6 users. However I would like to have some kind of feature that would inform users that they are using IE6 and that their browser is not supported. I was thinking about two possible solutions:

  1. 弹出窗口(可能是Javascript),其文本会在用户访问的每个页面上通知用户
  2. 一些带有信息的特殊页面,该用户在尝试访问我的应用程序时将被重定向到该页面

两种解决方案都足够,但是我更喜欢第二种解决方案.可能需要使用一些魔术javascript,有人可以提供解决方案吗?

Both solutions will be sufficient, however I would prefer the second one. Probably some magic javascript needs to be involved, can anyone could please provide a solution to this?

推荐答案

我可能会使用条件注释,以便在页面上以清晰的用户视图显示条形或框形.对于涉及的每个人,JavaScript/Meta重定向通常都很烦人.

I would probably use a conditional comment to show a bar or a box in clear view of the user on the page. JavaScript/Meta redirection is usually rather annoying for everyone involved.

<!--[if IE 6]>
    <div id="IE6Div">This Web Application does not support Internet Explorer 6.  
         Click <a href="/noIE6.htm">here</a> for more information.</div>
<![endif]-->

您可以根据自己的喜好对其进行样式设置.我建议您在页面顶部使用一个大的粗条,即使滚动时该条也会被卡住,请关闭javascript并刷新堆栈溢出页面作为示例.

You can style it however you like then. I recommend a big bold bar at the top of your page that is stuck even when scrolling, turn off javascript and refresh a stack overflow page for an example.

如果您坚持使用JS方法,请尝试使用Quirksmode中的此脚本用于检测浏览器和版本,然后使用window.location.replace(newUrl)进行重定向.

If you're insistent on the JS method, try this script from Quirksmode for detecting the browser and the version, then use window.location.replace(newUrl) for the redirection.

这篇关于如何通知用户Web应用程序不支持IE6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆