如何检测IE6,并显示警报? [英] How to detect IE6, and show alert?

查看:105
本文介绍了如何检测IE6,并显示警报?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在使用IE6的用户使用我的网站时显示警报。我在想这样的事情会发挥作用:

I'm trying to show an alert when a user using IE6 uses my site. I'm thinking something like this will work:

<!--[if IE 6]>
<script language="Javascript">
alert ("The year 2004 just called - they want their browser back!")
</script>
<![endif]-->

我会测试这个,但是我没有Windows盒子可以使用ATM。这是正确的方法吗?

I'd test this but I don't have a Windows box I can use ATM. Is this the correct way to do it?

推荐答案

可以,

当然,您可以使用类似这样的,这有点多友好。

Of course, you could use something like this, which is a bit more friendly.

这篇关于如何检测IE6,并显示警报?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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