使用javascript检测浏览器类型 [英] Using javascript to detect browser type

查看:33
本文介绍了使用javascript检测浏览器类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用这一行来检测浏览器类型:IE 或 Firefox.

I'm trying to use this line to detect browser type: IE or Firefox.

alert(isBrowser("Microsoft"));

但我什么也没得到,警报甚至没有弹出.不知道我做错了什么.

but I get absolutely nothing, the alert doesn't even pop up. Not sure what I'm doing wrong.

检测浏览器类型的最佳实践方法是什么?

What would be the best practice way to detect browser type?

推荐答案

我希望这会有所帮助:

http://www.quirksmode.org/js/detect.html

(这是一个很长的脚本,所以我不想在这里发布)

(it's a long script, so i don't want to post it here)

这篇关于使用javascript检测浏览器类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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