查找浏览器类型和版本? [英] Find Browser type & version?

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

问题描述

任何人都知道找到类型&的好而可靠的方法.使用JavaScript/jQuery在客户端上安装的浏览器的版本?

Anyone knows of a good and reliable way to find out type & version of a browser installed on client either using JavaScript/jQuery?

看起来jQuery具有一些内置功能,但是在检测Chrome时遇到了问题.还有其他可靠的方法吗?

Looks like jQuery has some built-in functions, but it is having problems in detecting Chrome. Any other reliable way of doing it?

推荐答案

如果您想要有关访问者使用的浏览器的信息,并将其用于统计或向用户显示信息,则可以使用

If you want information about the browser that your visitor uses, and use it for statistics or displaying information to the user, you can use the jQuery Browser Plugin.

它为您提供了javascript对象 包含所有信息 关于正在使用的浏览器.

It gives you an object in javascript that contains all of the information about the browser being used.

请确保执行功能检测,而不是浏览器检测,当您想确定某个功能是否在浏览器中可用,应用错误修正等时.

Be sure to do feature detection instead of browser detection when you want to determine if a certain feature is available in a browser, apply bugfixes, etc.

无需重新发明轮子.

这篇关于查找浏览器类型和版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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